From: Jamis Buck Date: 2005-01-24T23:12:17+09:00 Subject: Re: attr On 22:51 Mon 24 Jan , Trans wrote: > In the upcoming release of Ruby Carats I have a little lib called > attr.rb. > > What it does is define a mater #define_attribute which all attribute > defintions are routed thru. Then I redefine #attr (since current > definition is basically never used) to call #define_attribute that Well.... claiming that it is "basically never used" is dangerous. I've used it, and I know I've seen code that uses it. Changing the semantics of an existing method is always going to be dangerous, no matter how infrequently you believe the method is used in practice. Caution, caution, caution. :) > So I have a few questions. First, what do you think of this in general? > Second, there is no "extra" convenient way to do an accessor b/c I > haven't been able to find a nice notation --one just has to put both, > 'attr :a, :a='. Is this too inconvenient? Can anyone think of a good > notation? I like the features you've added, though. Could you perhaps call it something other than "attr", to avoid breakage? - Jamis -- Jamis Buck jamis_buck@byu.edu http://jamis.jamisbuck.org ------------------------------ "I am Victor of Borge. You will be assimil-nine-ed."