in reply to Re^7: Experimenting with Lvalue Subs
in thread Experimenting with Lvalue Subs
You're creating a syntax that has side-effects that aren't obvious from reading the code.
I cant think of any situation where I want a user to be able to have set access to a property of my object and not have side effects. It seems a simple rule, if you are assigning to a method that there will probably be side effects.
It seems to me that your expectations are completely in line with current :lvalue subs, do you find them useful? I certainly dont, and it seems to be a general consensus of folks who write a lot of perl that :lvalue subs as currently implemented dont solve a problem any of us need solved, wheras there seems to be a general consensus that such an equivelency as I mention is exactly what we want. To many of us it seems bizarre that VB and Java both provide easy ways to have validatable assignable methods and Perl doesnt.
I think juerd has posted a number of examples of where such behaviour would be very useful indeed. Hopefully he will reply with a link.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Experimenting with Lvalue Subs
by Juerd (Abbot) on Jan 25, 2005 at 22:55 UTC | |
|
Re^9: Experimenting with Lvalue Subs
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 |