Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Your abs() critique raises points that I haven't seen raised around here before, at least in this purticular context... but it gets the conclusion wrong, by (I suspect conciously) only considering the point against the status quo -- that is, that there is a convention for writing the absolute value in mathematics, and that perl should follow that convention.

This misses a whole slew of points in the other direction. The first, and probably most important, is that special cases are bad. There's a whole bunch of functions in perl, and there's no purticular reason that this purticular function should be written differently then the rest of them. It's simply not that important. There are functions that do have special syntax -- +, -, *, /, %, x, for example -- but those are generally more important -- indeed, even in math, they're normally called "operators", not "functions".

Secondly, there's also a convention in other programming languages to use abs() as the absolute-value function.

Thirdly, we already have uses for |, and important ones at that. It turns out they don't conflict as a matter of grammar, but they can easily conflict within the mind of the programmer.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).


In reply to Re: Perl::Improved Volume 0, Number 1 by theorbtwo
in thread Perl::Improved Volume 0, Number 1 by NodeReaper

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 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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2022-01-21 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?