Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: lvalue considered harmful...by BrowserUk (Patriarch) |
on Dec 14, 2002 at 19:54 UTC ( [id://219886]=note: print w/replies, xml ) | Need Help?? |
Agreed. Though I would argue that the problem is not the concept of lvalue subs that is at fault, but just the current implementation. As they stand currently, they are almost completly useless. The fact that there is no way to access the value being assigned prior to it's assignment, and that any attempt to check it after assignment prevents the assignment, is simply bewildering. Why the value is not made available to the sub as the last value in @_ I simply don't understand. The current implementation where the assigned value magically overwrites the last available lvalue in the sub if there is one and breaks if there isn't is just simply broken. Shame. No wonder nobody uses them. Examine what is said, not who speaks.
In Section
Meditations
|
|