[ENH] addPrototype:derivedFrom:
Brian T Rice
water at tunes.org
Fri Aug 15 04:28:18 PDT 2003
I've added a primitive and a Slate variant (which work identically) of a
single new method, with this signature:
x@(Root traits) addPrototype: name@(Symbol traits)
derivedFrom: sequenceOfPrototypes
It handles a few things for us:
(1) Invokes derivation of traits automatically.
(2) Abstracts over derive vs. deriveWith: for creating new traits.
(3) Automatically sets the #name slot of the new traits object to the name
given to the method. This was not happening before at all and resulting in
'_' being carried forward and showing up in the inspector and REPL: not
useful at all.
(4) Captures intent, which is nice to have in addition to everything else.
I've also adjusted every single file in the repository to use it where it
applies. This wasn't much work, just a search-and-replace. I'll update the
online manual soon with it.
--
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/
More information about the Slate
mailing list