Initial core port of "Squeak Traits"

"Márton Sasvári (IJ/ETH)" Marton.Sasvari at ericsson.com
Thu Nov 24 06:21:29 PST 2005


Hi,

I was reading through the new traits code the other day and got stuck on 
the following lines:

---
ts@(TraitSum traits) services [Set new].

ts@(TraitSum traits) services
[ts bases reduce: [| :b1 :b2 | b1 services union: b2 services]].
---

and later

---
to@(TraitOverride traits) services
"Act like the overlay itself."
[to overlay services].

to@(TraitOverride traits) services
"Apply the overlay to the underlying Trait."
[to overlay services over: to base services].
---

isn't this a rebinding of the method loosing the first definition 
immediately ? What's going on here if not ?

Actually I was looking for the #services method definitions to find out 
the purpose why they aren't defined as a slot on Trait right away as it 
is implicitly assumed that the answer to #services will undestand 
#keysDo:, #keysAndValuesDo: etc., but I gave up at this point.

BR,
Marton




More information about the Slate mailing list