Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Thoughts on replacing -> with .

by choroba (Bishop)
on Jun 11, 2013 at 07:51 UTC ( #1038215=note: print w/replies, xml ) Need Help??

in reply to Thoughts on replacing -> with .

Another "small" step to make Perl 5 closer to Perl 6?
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Thoughts on replacing -> with .
by Aaronrp (Beadle) on Jun 11, 2013 at 15:47 UTC

    Maybe, if we're making operator changes, we could go all out.

    use colons - uses : for method calls and dereferencing. Uses !! for introducing the last part of the ternary operator. (Uses of "!!" to mean "not not" will have to be replaced by "! !", that is, with a space in the middle. This is clearer anyway.)

    use colon_equals -- uses := for assignment instead of =, and uses = for numeric comparison

    use nostash -- Eliminates the stash, in favor of just having a scalar entry and dereferencing as necessary. @x becomes shorter syntax for @{$x}, %x shorthand for %{$x}, you get the idea.

    use worddot -- "." is confusing, since inside regular numbers (and v-strings I guess) it forms part of a term, but elsewhere is an operator that separates terms. (Why doesn't 5.5 result in the concatenation of the stringifications of the two 5s?). This pragma would (as in, I vaguely recall, QuickBASIC) make dot a word character, instead of "_". This pragma would replace "_" with "." except that the decimal point would still be "." Then "." would always be a character inside a term, and _ would always be a regular punctuation character, usable for operators.

    Might be a while before I can learn enough to write patches...

      and of course the perldocs need to be cleaned too!

      Cheers Rolf

      ( addicted to the Perl Programming Language)

      That ?? !! ternary operator in P6 is hideous.

Log In?

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

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

    Results (111 votes). Check out past polls.