Slot addition protocol change

Brian Rice water at tunes.org
Sun Jan 8 10:35:07 PST 2006


Hi all,

I've updated the alpha images and the tarball with a correction to  
the slot addition protocol of addSlotNamed:(valued:),  
addImmutableSlotNamed:, addDelegateNamed:,  
addImmutableDelegateNamed:. The change is that they now return the  
object placed in the slot, rather than the object to which the slot  
was added. This makes them consistent with higher-level protocols  
like addPrototype:, define:, and ensureNamespace:.

It turned out while making this change that none of the code in our  
repositories used the return value, so I didn't feel an obligation to  
keep it as-was. Basically this allows the use of slot-addition  
protocol in a recursive expression without needing locals to hold new  
values. The GUI demo in demo/ui.slate makes use of this convention  
for clearer code, which convinced me.

--
-Brian
http://tunes.org/~water/brice.vcf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20060108/b8aa1418/PGP.pgp


More information about the Slate mailing list