Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Funny. I thought that I just said that Attribute::Property is an unacceptable solution to me. That means that it doesn't take away the issue.

But you're right that validation is not the only thing that I object to about lvalue accessors. With OO I'd expect to be able to do something like create a Length module, Length objects can be accessed/set in various units (inches, meters, feet, miles, etc). An external user should have no idea what the internal representation is.

How do I do it with lvalues?

I guess that you can use tie, but implementing that takes enough work and adds enough surprise that I don't see it as a net win.

To me the syntactic sugar is simply not worth the extra work and complexity.

As for Perl 6, I'll evaluate each feature and come up with my own opinions. I'll feel free to ignore anything that I don't like - the language is rich enough that I have no shortage of viable choices for which subset of features to use and which to ignore. If I don't like the implementation of lvalue subroutines there, I'll ignore it like I what Perl 5 does. If I like it, then I'll feel free to use it like I would in Ruby.

And whichever I do, I'll feel free to dislike people who categorically declare that my considered set of choices are flawed.

In reply to Re^4: Use method/function signatures with Perl by tilly
in thread Use method/function signatures with Perl by Ovid

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    [Eily]: Maybe the puns in his dialogues were somehow kept through translation, but I can tell he lost his accent
    [LanX]: qui?
    [Eily]: Astérix
    1nickt gives up on finding a Perl YAML parser that supports hash merging. In 2017.
    [LanX]: Oh yes true, he lost his accent! xD
    [Eily]: and since his name is a modified version of astérisque (asterisk), which is a typographical symbol, I think it's even funnier that he would lose a diacritic
    [Eily]: the pun doesn't work so well with "he lost a diacritic" though :P
    [LanX]: Obelix might offer to find it again ...
    [LanX]: not much to translate anyway since Goscinny died
    [Eily]: https://en. wiki/List_of_Aster ix_characters some of the names were changed to include a new pun

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (13)
    As of 2017-05-24 14:58 GMT
    Find Nodes?
      Voting Booth?