Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Why should I use perl 5.10?

by moritz (Cardinal)
on Nov 30, 2007 at 10:31 UTC ( [id://654079]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why should I use perl 5.10?
in thread Why should I use perl 5.10?

Wouldn't even println() have been a better naming choice?

Surely not!

Perl builtins tend to be one word that can (syntactically) be read as plain English, with a few exceptions that come from POSIX system calls (like gethostbyname)

And println is too long, compared to say ;-)

The word say suggests some I/O similar to print, which in fact it is. The exact semantics are not obvious, but they aren't hard to learn.

Replies are listed 'Best First'.
Re^4: Why should I use perl 5.10?
by blazar (Canon) on Dec 01, 2007 at 15:44 UTC
    And println is too long, compared to say ;-)

    I personally believe that this is serious enough not to warrant a ;-) since the keyword is huffmanization. IME I tend to print ... "\n" just as often or more than in "\n"-less form so in oneliners and minimal example scripts I tend to use -l quite a lot. But that is bad and risky in that as sometimes it pops up, it can interact with modules that do actual prints. And module authors probably should not be concerned with setting local $\ accordingly. So for all these reasons and for the others that have been said here thus far, however simple it is say() is welcome, and a blessing!

      And module authors probably should not be concerned with setting local $\ accordingly.

      They are exactly the people who should be concerned with it. They are making assumptions about the environment in which they will run, which is not theirs to dictate.

      But overall, I welcome say.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        They are exactly the people who should be concerned with it. They are making assumptions about the environment in which they will run, which is not theirs to dictate.

        I personally believe that you're perfectly right. What I meant is that it is annoying, though, to have to do so. Specifically, to print is also much like speaking, and it is strange that the environment influences how do I speak: generally it is to be expected that people will understand differently and I may consciously adapt the way I speak, but not directly because of the environment - except when it is helium filled, perhaps.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://654079]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-28 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found