[squeak-dev] The Trunk: Traits-cwp.301.mcz

Tobias Pape Das.Linux at gmx.de
Sat Jan 11 15:04:12 UTC 2014


On 11.01.2014, at 15:19, Frank Shearar <frank.shearar at gmail.com> wrote:

> On 10 January 2014 15:22,  <commits at source.squeak.org> wrote:
>> Colin Putney uploaded a new version of Traits to project The Trunk:
>> http://source.squeak.org/trunk/Traits-cwp.301.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: Traits-cwp.301
>> Author: cwp
>> Time: 10 January 2014, 10:21:42.335 am
>> UUID: 4d29a1a0-5d8b-4439-a082-e42b5e69efc9
>> Ancestors: Traits-nice.300
>> 
>> Implement Trait>>unload, for better polymorphism with classes.
>> 
>> =============== Diff against Traits-nice.300 ===============
>> 
>> Item was added:
>> + ----- Method: Trait>>unload (in category 'initialize') -----
>> + unload
>> +       "For polymorphism with classes. Do nothing"!
> 
> A second time, with my brain in gear. It is possible to make this
> actually unload the Trait and do something useful: flatten the Trait
> into all its users. Trait class >> #removeAllTraits does this when
> Traits is unloaded. One tricky thing is that #removeAllTraits flattens
> _all_ Traits used by a class. So if class Foo uses TBar and TBaz,
> "TBar unload" ought to flatten TBar's methods, and not TBaz's.
> 
> If that gets implemented, that is.
> 

I think this should be explicit.
I mean, if you unload a class, it is not like its functionality
is folded into all its users. Hence, I think we could have:
• #unload as of now
• #flatten to fold functionality into its clients
• #flattenAndUnload to do both…

Best
	-Tobias

PS: The flatten implementation could be useful, eg, to make it possible to
    flatten-ly load Squeak/Pharo mcz that use traits into gemstone.
    (I always wanted to do that…)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1665 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140111/ed56e333/signature.pgp


More information about the Squeak-dev mailing list