Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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


In reply to Re^2: Thoughts on replacing -> with . by Aaronrp
in thread Thoughts on replacing -> with . by Aaronrp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-19 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found