in reply to Re^6: Experimenting with Lvalue Subs
in thread Experimenting with Lvalue Subs
Oh ... that just looks horrible. You're creating a syntax that has side-effects that aren't obvious from reading the code. Then again, the entire lvalue thing is ... it's just plain stupid, in my opinion. Function calls that, depending on if they're being assigned to, will behave one way or another. And, frankly, unless you bring a lot of outside knowledge to the table, you don't know which ones can do it and which ones can't.
lvalue subs work in Javascript because Javascript is built to treat methods and attributes identically - it's a slot-based OO language like Self. And, I still have problems with the entire concept. It assumes that I, the programmer, don't need to know what is data and what is behavior. I may not want to know it at times, but I would certainly like to be able to know it, if I want to see the difference.
Perl5 is not like Self. Perl5 is like C. Perl6 may be more like Self, in which case lvalue subs will be built into the language and they will work and they will work just fine. I have complete faith in Larry, Damian, et al that they will not screw this up. But, C does not have lvalue functions. C++ doesn't have lvalue functions.
You know what - lvalue mutators just seem wrong to me. What's the client doing screwing around inside the object's internals? That's what lvalue mutators mean you to do ...
Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: Experimenting with Lvalue Subs
by demerphq (Chancellor) on Jan 25, 2005 at 15:03 UTC | |
by Juerd (Abbot) on Jan 25, 2005 at 22:55 UTC | |
by dragonchild (Archbishop) on Jan 25, 2005 at 15:09 UTC | |
by demerphq (Chancellor) on Jan 25, 2005 at 15:23 UTC | |
by BrowserUk (Patriarch) on Jan 25, 2005 at 15:35 UTC |