[DFW.pm] Homework for the list, and for Oct 08 meeting

Tommy Butler homebase at internetalias.net
Thu Sep 11 13:29:38 PDT 2014


Any language that makes me use a plus sign for string concat... *ducks*

--Tommy Butler

On Sep 11, 2014, "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
>On Thu, Sep 11, 2014 at 02:42:16PM -0500, Robert Flach wrote:
>> Yet another way to do it. Interesting.  I would have assumed that
>> the unary + would have caused a numeric contextual evaluation of the
>> contents of the parens, causing the string prints to print zero
>> instead, but it works a charm.  Nice
>
>Coming from the Perl 6 world, it feels SO WRONG to me that a
>numeric context operator isn't producing a numeric result.  It's
>one of those "OMG special case" exceptions that drive newbie 
>Perl 5 programmers nuts, and definitely doesn't follow the 
>principle of least astonishment.
>
>So yes, it works, but it's not something I'd encourage or want to
>see in code.  :)
>
>FWIW, Perl 6 avoids this altogether by using whitespace to know
>when parens are part of the subroutine call syntax:
>
>    print(2+3) * 7         # parens belong to "print" call
>    print (2+3) * 7        # parens don't belong to the "print" call
>
>Pm
>_______________________________________________
>Dfw-pm mailing list
>Dfw-pm at pm.org
>http://mail.pm.org/mailman/listinfo/dfw-pm

-- Sent with K-@ Mail - the evolution of emailing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20140911/0809f6e8/attachment.html>


More information about the Dfw-pm mailing list