On Sun, Sep 17, 2000 at 11:25:49PM -0700, Nathan Wiger wrote:
> > I also don't see that the optimization of one half of the accessor vs
> > the other is worth the trouble.
> 
> Well, it depends on how much faster the autoaccessor is. If it is much
> faster, and you need to access a whole bunch of data repeatedly, then
> this makes sense. But if the autoaccessor is about the same as a sub
> speed-wise, then screw it, I agree.

I dunno, its going to be alot of work for an optimization.  Hell, if
you implement that, you might as well go all the way and implement
polymorphic functions.


> > >    2. readonly rvalue subs
> > 
> > http://www.mail-archive.com/perl6-language-objects@perl.org/msg00096.html
> > implies that this isn't needed because of the proposed :constant hash
> > attribute.  This isn't enough. 
> 
> Yeah, check out this email:
> 
> http://www.mail-archive.com/perl6-language-objects@perl.org/msg00099.html
> 
> The idea I originally had was that :raccess would specify something was
> an rvalue accessor which only returned a value, and couldn't take
> arguments. I think this is probably the way to go, otherwise we have to
> start adding other keywords, properties, etc, which really complicate
> things too much.

Saw that email, its not enough.  The usefulness of an automated
accessor is hamstrung if you can only get with it and never set.  The
vast majority of cases wil be read/write.  

You need not have :raccess, :rvalue, :laccess and :lvalue.  Just
:raccess, :rvalue and :readonly (not :ronly, looks like :rightonly).

For an idea of how complicated this can all get, look at
Class::MethodMaker.  Has a *bewildering* array of options.  What
you've got so far looks down right boney by comparison.


> Couldn't quite see what you were getting at here - maybe a little
> clarification. I'm pretty sure I understand ("autoderef bad, but forced
> copy bad too") but want to make 100% sure.

That's about it. *grunt*


-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
Plus I remember being impressed with Ada because you could write an
infinite loop without a faked up condition.  The idea being that in Ada
the typical infinite loop would be normally be terminated by detonation.
        -- Larry Wall in <[EMAIL PROTECTED]>

Reply via email to