Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

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

Someone much wiser than me once said it is better to remain silent and be thought a fool than to open one's mouth and remove all doubt.

That being said ... I feel compelled to ask the (obvious?) question of what does this buy us? To me, it looks a lot like using postfix notation in a way that does not contribute to making Perl read like English. That is, where next unless $foo > $bar; reads like a sentence in English, @foo->push($bar) doesn't, to me at least. (I should point out that I take strong exception to PBP discouraging postfix notation.)

I think my point can be demonstrated even better when given something like 'Hello, world!'->upper();. There is no need whatsoever for an argument to "upper" in that case. How is that more clear as to intent than upper('Hello, world!');? (I will grant that a modification-in-place such as $foo->upper() might be more concise that $foo = upper($foo), but clarity would still be open to debate, especially given a use-case such as say $foo->upper();.)

I can see where this could be useful for a language that is not as flexible or useful as Perl (i.e. strongly typed languages that resemble a straight-jacket) but I don't see that it adds to Perl other than contributing to (excessive?) code bloat in an effort to add something that Perl might not really need given its existing versatility.

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

In reply to Re: Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ;) by boftx
in thread Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ;) by LanX

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 romping around the Monastery: (5)
As of 2024-03-29 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found