Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Array Plus Operator

by QM (Parson)
on Dec 18, 2017 at 11:09 UTC ( [id://1205784]=note: print w/replies, xml ) Need Help??


in reply to Array Plus Operator

With legacy code, and things like this that don't make sense superficially, think about other elements that might have been there before that needed disambiguation, but were changed to what you see.

Here's an overly dramatic explanation of a different kind. Just imagine that originally there was an empty hash constructor, with a leading plus: +{}. Sometime later it was changed to an empty array, +[]. Since the expression compiled with the plus, and didn't change the result, it was overlooked by the author and left to furrow future brows.

(I must admit Poe's Dupin is my favorite detective, even above Sherlock, precisely for this mind-reading ability, fantastic as it must be.)

-QM
--
Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2024-04-16 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found