Fwd: [Squeak-fr] Ruby et les Traits.

Andreas Raab andreas.raab at gmx.de
Mon Oct 22 20:37:10 UTC 2007


Out of curiosity, what is the difference between Ruby's modules and 
traits? They strike me as extremely similar, but not being the local 
Ruby guru I might overlook some implications. As far as I understand it 
both allow "grouping of methods" (aka: include statements) and both 
disallow state (in Ruby's case simply because state access is always a 
dynamic attribute lookup). So what's the difference?

Cheers,
   - Andreas

stephane ducasse wrote:
> 
>> Quelques propos (récents) de matz (Yukihiro Matsumoto) à propos
>> des Traits :
>>
>> - "Too bad I didn't know about traits when I designed Ruby."
>>
>> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/274227
>>
>> - "If I knew traits before designing Ruby, I'd have chosen traits over
>> modules.  But that's the life."
>>
>> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/274242
> 
> this is why I will try to find some times to polish traits in squeak
> 
> stef
> 




More information about the Squeak-dev mailing list