gutopia-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rgui-dev] Jumping Right In


From: Tom Sawyer
Subject: Re: [rgui-dev] Jumping Right In
Date: 07 Aug 2002 17:09:13 -0600

On Tue, 2002-08-06 at 16:26, Massimiliano Mirra wrote:
> It's not really instance variables that we're after.  They represent
> the state of an object, not what we want to expose of it to the
> outside.  That's what getter methods are for.  So, your current way of
> dynamically adding code to *methods* might have implementation
> drawbacks but is conceptually the right one or one of the right ones.

did i also mention the problem of binding to arrays? how do you catch
#<< methods that alter an instance array? even if you have an
attr_reader instance method that is supposed to ONLY allow one to READ
the instance variable, if it is an array or other complex object, one
can manipulate it with #<< and the like. i wrote about this on ruby talk
some time ago. i was told to use .dup.freeze to prevent this. don't
think that's going to work for us ;-)

-- 
~transami




reply via email to

[Prev in Thread] Current Thread [Next in Thread]