Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Thoughts on replacing -> with .

by Aaronrp (Beadle)
on Jun 11, 2013 at 15:47 UTC ( #1038282=note: print w/replies, xml ) Need Help??


in reply to Re: Thoughts on replacing -> with .
in thread Thoughts on replacing -> with .

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...

Replies are listed 'Best First'.
Re^3: Thoughts on replacing -> with .
by LanX (Chancellor) on Jun 11, 2013 at 16:17 UTC
    and of course the perldocs need to be cleaned too!

    Cheers Rolf

    ( addicted to the Perl Programming Language)

Re^3: Thoughts on replacing -> with .
by Ralesk (Pilgrim) on Jun 12, 2013 at 11:23 UTC

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038282]
help
Chatterbox?
[stevieb]: with M::S, you can also add other tags, but defaults work... such as --license=perl --eumm
[LanX]: I'm not a big fan of pure make, apparently the auto generated ones are so complicated to be able to work with all possible makes
[stevieb]: I find the M::S makefiles it generates are quite straight forward, and I usually have to add a few things (github info etc). They're about 15 lines or so give or take.
[Corion]: I don't think the EUMM-generated Makefile is that complicated ;)
[stevieb]: Corion++
[jedikaiti]: RonW++ #I have so much accumulated in my memory that finding the right item at a given moment often fails
[LanX]: corion only > 800 lines

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-08-18 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (310 votes). Check out past polls.

    Notices?