From: Ilias Lazaridis Date: 2005-05-12T10:15:27+09:00 Subject: Re: [RFC] traits-0.1.0 Ara.T.Howard@noaa.gov wrote: > On Wed, 11 May 2005, Ilias Lazaridis wrote: > >>> - trait is short >> >> and used within C++ > > hmm. > >>> - traits is a synonym for attribute (attr, attr_accessor, etc) >> >> no need to use a synonym. > > i mean it's meaning is the similar to 'attr :a == trait :a'. I mean: no mean to use (and search) a synonym >> [...] >> >>> random thoughts for attributes/against traits >>> >>> - no confusion with other traits >> >> yes > > but are the other traits being used? also these seem to be called roles in > some langs too... this is a valid concern though. again: no need to research. >>> - the alias 'has' can make 'attribute' plenty short (the current >>> version of traits uses this alias too btw.) >> >> yes >> >>> one other thing, the impl of traits was suprisingly hard. the tricky >> >> [...] >> >> The code fragments (usage) I've saw are not thus attractive. >> >> Code should looks simpler, more 'natural'. > > > what do you think could be more natural than > > class C > has 'a' => 42 > end class C a = 42 end class C var a = 42 end > c = C::new > p c.a #=> 42 > > or > > class AbstractWidget [...] > class SmallishBlueWidget [...] I dislike all this, but cannot clarify why. concept, ruby, flexibility > it's the best i could manage. come up with something more natural and i'll > see what i can do to implement. > >> This is an important project, but should be setup collaborative. > > i'm working 70+ hours per week already - but if someone wants to take > over and do the initial setup work it's fine with me. I think you should postpone this project. >> So, if you setup a ruby-forge project, people can contribute. > > this is welcome of course - but see above. > >> call it "attributes" or "attrib" or "has" - but not "traits". > > +1 for attributes then. ok .. -- http://lazaridis.com