[squeak-dev] Re: NanoTraits in trunk
Andreas Raab
andreas.raab at gmx.de
Thu Dec 31 16:56:54 UTC 2009
Randal L. Schwartz wrote:
> What's the best way to learn:
> 1) what these are, if you never learned about the old Traits
The same way by which you'd learn about the old traits. Read a paper or
something.
> 2) how these are different from the old Traits
I opted out of every single improvement that was discussed to avoid
incompatibilities. As far as I know this version is 100% compatible in
terms of black-box behavior.
> 3) what *might* break (things to watch out for) when porting old code
There are two potential issues: One is if your package uses trait
implementation specific methods. Most of these can be replaced merely by
using the public interface, for example instead of "TFoo addExclusionOf:
#bar" just use "TFoo - {#bar}" which is precisely the same.
The second potential issue is that traits now inherit from
ClassDescription so a missing override in TraitBehavior could
potentially cause problems (say, if you had Object>>isTraitOrObject
^true and Behavior>>isTraitOrObject ^false). This should be very rare
though - most cases that I've seen use overrides in both Behavior and
TraitBehavior and if that's done consistently it will work fine.
Generally I really don't expect any issues. Since the structure was
preserved pretty much everything should just work.
> I'm asking partially for me, but also so I can point others to the right
> info.
>
> If the answer is "well, that's the next step - documentation", it'd
> be nice to know. :)
No, the next step is unloading :-)
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|