in reply to Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ;)

Again, a fascinating discussion on PerlMonks. To me, it is completely incomprehensible, why there are such strong opinions put forward.

After all, no change to the language is required, there is no performance implication to anyone who does not want to make use of this proposal. No existing feature of the language will be disabled or discarded. Everything is legal Perl since long time.

Just a clash of philosophies.

No need to get excited.

Calm down, fellow monks.

P.S.: If one could now find out how postfix dereference can be done this way, we can end another fruitless discussion.

P.P.S.: Like this (ugly)

my $asArray = sub { @{ $_[0] } }; my $aref = [ 1, 2, 3 ]; print "$_\n" for $aref->$asArray;
  • Comment on Re: Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ;)
  • Download Code

Replies are listed 'Best First'.
Re^2: Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ;)
by LanX (Saint) on Dec 14, 2013 at 15:56 UTC
    > To me, it is completely incomprehensible, why there are such strong opinions put forward.

    Balancing principles like "reads like a human language" and "orthogonal features¹" is not easy.

    Especially if they are confronted with...

    • "avoids too much nesting"
    • "backward compatible" (Perl4)
    • "maintainable implementation"
    • "portable implementation"
    • "multi-paradigm"
    • "glue language"
    • "combines features of older languages"
    • "Huffman coding"
    • ...²
    • "CLI/one-liner friendly "
    • "fast"
    • "extendable"
    • "suitable for project guidelines"
    • "DWIM"
    • "DRY"
    • "self documenting"

    ... it stops being straight forward science and becomes empirical.

    Seeing the big picture is complicated and long discussions become annoying.

    After some time many end just reacting on trigger signals, like

    "METHODS! They want to transform Perl to Java!!!".

    > P.P.S.: Like this (ugly)

    Indeed, not the best example! :)

    But I agree a well designed autoboxing (i.e. w/o the need of a $-sigil) would help a lot here.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

    ¹) small set of basic rules which can be easily learned and consistently recombined.

    ²) "remembering all principles" (from here on some items were added)

Re^2: Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ;)
by BrowserUk (Patriarch) on Dec 14, 2013 at 10:36 UTC

    First consider, how does eschewing all the possible operator syntaxes -- prefix, postfix, infix, circumfix -- along with all precedence; in favour of a single operator syntax, increase flexibility?

    Then read How non-member functions improve encapsulation in full. Then note the author.

    Then consider how the ability to call any function as a "method" of any random variable -- regardless of anything -- will play amongst the Duck typing is no typing crowd.

    And I'm far from excited. I'm bored to see this being raked over again; especially upon such scant & broken reasoning.

    There is simply no reason to lose one's cool in order to counter such illogicality.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Who talked about eschewing anything?

      How does adding another way to TIMTOWTDI make the whole thing less flexible?