Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: What am I not understanding about $,

by FormerMonk (Initiate)
on May 11, 2016 at 00:48 UTC ( [id://1162676]=note: print w/replies, xml ) Need Help??


in reply to Re^2: What am I not understanding about $,
in thread What am I not understanding about $,

Thank you oh so very much for reminding me why I left Perl Monks. I was last here 5 years ago under a name I have long since forgotten the password to, and — to be honest — who I am (or was) is of no consequence. If you need to know who I am to take me seriously, then you've already lost the plot.

Do you remember the "fun" that was this SoPW? I was around for that and wondered why Abigail responded the way he did. Over time I came to understand his position; eventually leading me to quietly walk away a few years after the aforementioned exchange.

I will leave you with two things:

  1. Mutating global state is bad. We all know this. Why should Perl special variables get a pass on that?
  2. And the last is certainly not the least.

  • Comment on Re^3: What am I not understanding about $,

Replies are listed 'Best First'.
Re^4: What am I not understanding about $,
by BrowserUk (Patriarch) on May 11, 2016 at 01:31 UTC
    Why should Perl special variables get a pass on that?

    If you, as a "former monk" don't understand, then it both explains why you left; and why nothing I could possibly say would make the slightest bit of difference to your perception of this situation.

    The key indicator here is your phrase: "Mutating global state is bad."

    By which you mean: varying variables with top level scope. is verboten; (by you!)

    1. There is no point in having variables; if you cannot vary them!

      Variables that do not; or are not "permitted" to, vary, are constants.

      (It is this, beyond the performance penalties, that make Readonly a nonsense.)

    2. Every program has a 'top level scope'.

      Choosing to differentiate between "global variables" and "top level, lexical variables" is a sham. A pointless and puerile non-distinction.

      Further, every (useful) program ever written makes some assumptions about ... whatever. This is usually referred to as "configuration".

      So your (bland and uninteresting; unless you bother to follow up with some supporting argument) statement reduces to: is there any legitimate reason for a program to ever override its startup assumptions?

      And fine, if you can sit wherever you are, and hand-on-heart, conclude that there is never a legitimate reason for a program to override its startup assumptions; then you've won the argument.

      But, before you pat yourself on the back consider each of these:

      • Have you never written a program that needed to override the default assumption about what constitutes a newline?

        Eg. A *nix program that used sockets.

      • Have you never written a program that needed (or benefited from) overriding the default value of cwd?

      • Have you never written a program that benefited from overriding the default setting of STDIN, STDOUT or STDERR?

        You've never used the one-arg form of select; nor redirected STDERR to a log file?

      • You've never messed with %INC?

        Eg, used lib?

      • You've never tweaked %ENV?
      • How about installed your own signal handler in %SIG?
      • You've never felt the need to reset $@, $!, $^E, and $? before running code that might influence them; and which you need to make decisions upon the values they might acquire?

    If you can say "No" to all of those; then you've both won the argument, and are either a liar; or not a programmer.

    Being selective about what functionality you accept as legitimate, and what you personally choose to reject is one thing; attempting to impose your affectations upon the world at large is another.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^4: What am I not understanding about $,
by Anonymous Monk on May 11, 2016 at 01:01 UTC

    Why bother saying any of that non-message related stuff if your message is what you want people to focus on?

    My argument isn't strong enough, so I'll distract with the sentimental nostalgia

    Mutating global state is bad. We all know this. Why should Perl special variables get a pass on that?

    Hehe, why single out special variables, like STDIN/STDOUT/STDERR/@ARGV, why not single out perl itself? I mean global namespaces and all that, that's ten times worse than the special variables

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-26 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found