Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Perl 6 - Operator renaming

by kirbyk (Friar)
on Sep 01, 2005 at 19:36 UTC ( #488471=note: print w/replies, xml ) Need Help??

in reply to Perl 6 - Operator renaming

Losing the . for concatenation is going to be painful. I understand that it'll go a long way to help non-perl developers do OO perl to have it be the same as in most other languages, and we need to steal the dot for that, but man, I concatenate a lot. And ~ is hard to type.

-- Kirby,

Replies are listed 'Best First'.
Re^2: Perl 6 - Operator renaming
by TedYoung (Deacon) on Sep 01, 2005 at 19:49 UTC

    Yea, I used to dread the idea of using ~ for concat. However, Perl6 does have string interp. In addition, Perl6's string interp. will be even more powerfull than 5's. So, we may find ourselves using ~ less often than we might think.

    Ted Young

    ($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)
      Also, ~ will be used to introduce string context too. So it may take a while, but first or later we will all get used to associate it to strings...
Re^2: Perl 6 - Operator renaming
by Juerd (Abbot) on Sep 03, 2005 at 21:45 UTC

    There are still many ways to avoid needing the tilde. There will be normal interpolation as in Perl 5 ("$foo$bar") but new is interpolation of closures ("int($baz) = { int($baz) }", resulting in something like int(5.6) = 5). There is also sprintf, now know as "as" ([$foo, $bar].as("%s%s") or maybe also "%s%s".as($foo, $bar), which may not make sense at first, but will make sense when written as as "%s%s": $foo, $bar).

    Personally I don't find ~ hard to type, and I absolutely love its place in Perl 6, not only as the string concatenation operator, but also as the string context operator and the stringy semi-meta operator in bit operators.

    Juerd # { site => '', plp_site => '', do_not_use => 'spamtrap' }

Re^2: Perl 6 - Operator renaming
by Cap'n Steve (Friar) on Sep 04, 2005 at 06:12 UTC
    Yikes, I didn't know they were changing so many basic things! I'm officially scared of Perl 6 now. That tilde just seems extremely unintuitive. I'm worried Perl 6 might be going the Python route and trying too hard to be different from every other language.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://488471]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-06-22 23:25 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.