I may appear that way, but coroutines flip back and forth.
You don't appear that way, don't worry. ;-) Well, this feature could still be implemented with a coroutine.
In any case, now I see what you were saying. There is indeed effectively no difference between your proposition and tieing. So why invent a new special-use mechanism rather than streamlining an existing one that can do the same job and more besides?
Who are we to question whether there is a better way? Explain to plebians. Pah!
Well, he did say:
Attaching validation routines as setters is falling into a kind of cut-and-paste fallacy. Most such validation should really be done by the subtype system in Perl 6.
And I agree with him. Just because we're used to putting validation in accessors doesn't mean it's the best way to do things. But all the discussion we've been having about lvalue subs revolves around trying to ease doing validation the way we've always done it, whether or not that's the best way to handle it. I've said before that I don't think it is.
Makeshifts last the longest.
In reply to Re^4: Assignable Subroutines
by Aristotle
in thread Assignable Subroutines
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |