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

Re^4: Why should I use perl 5.10?

by blazar (Canon)
on Dec 01, 2007 at 15:44 UTC ( [id://654331]=note: print w/replies, xml ) Need Help??


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

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!

Replies are listed 'Best First'.
Re^5: Why should I use perl 5.10?
by BrowserUk (Patriarch) on Dec 02, 2007 at 00:49 UTC
    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.

        it is strange that the environment influences how do I speak:

        I guess it's analogous to to getting an echo when conversing in a canyon :)

        Alternatively, you could make the case that a module doesn't speak for it's author, but rather acts on behalf of the application author that uses it.

        But, I do get what you mean. In the docs for 5.10 I just read about the new lexical $_ that locally overrides the global of the same name. It struck me that it would be nice if a similar arrangement was possible for many/most of the special globals, but on a package by package basis.

        Eg. If I declare and set a $/ at the top level of my package, then whenever the global of that name would be used, the local package instance (if it exists) would be used in preference to the global.


        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.

Log In?
Username:
Password:

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

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

    No recent polls found