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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.