On Fri, Feb 27, 2004 at 10:08:33PM -0500, Joseph Ryan wrote:
: Larry Wall wrote:
: 
: >On Fri, Feb 27, 2004 at 09:08:31AM -0500, Dan Sugalski wrote:
: >: Nope. If a language wants to provide get/set methods for class 
: >: attributes it needs to create those methods at compilation time.
: >
: >For Perl 6 it's a single method that might be lvaluable depending on
: >the declaration of the attribute.
: > 
: >
: 
: Right, but the compiler should be able to figure that out and emit
: the proper code.

Yes, but it'd be nice not to force the compiler to generate a heavy
proxy object for every lvaluable accessor to something that already
knows how to fetch and store.  We just need to make sure that the
attribute can serve as its own proxy.  That means the interface to an
attribute should be identical to the interface to a variable, once
you've taken a reference to it.  We're trying to make a big deal of
the notion that you can use an "is rw" method call anywhere you can
use a variable.  It'd just be nice if that didn't suck overly much.

Larry

Reply via email to