Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: Make $^V and "my" implicit

by davido (Cardinal)
on Feb 03, 2014 at 19:58 UTC ( [id://1073259]=note: print w/replies, xml ) Need Help??

in reply to Re^2: Make $^V and "my" implicit
in thread Make $^V and "my" implicit

"I don't see anything like this in other languages."

I can't use C++ range-based for loops, lambda expression syntax, variadic templates, uniform initialization, move semantics, or any other C++11 feature with my GNU compiler unless I specify -std=c++11 to the compiler. The reason, I suppose, is to avoid the potential for silently breaking old code by changes in keywords, syntax, and semantics. One might say that it would be better for the GNU compiler to default to C++11, and allow a command line switch to revert to older syntax/semantics. But then all old code would have to have its makefile updated, or it would run the risk of becoming broken.

This is the same principle at work with not, by default, enabling features to Perl that introduce newer keywords or semantics. Just because you haven't seen it in other languages doesn't mean it doesn't exist in other languages, and doesn't disqualify it as a "least dangerous" way to upgrade while avoiding damaging legacy code.


Replies are listed 'Best First'.
Re^4: Make $^V and "my" implicit
by gunzip (Pilgrim) on Feb 03, 2014 at 23:16 UTC
    OK, I should have said the languages I've looked into (Ruby, Python, Erlang, Clojure, Elixir, Javascript, Scheme, Lisp) get by without version strings specified in the code.

      The Python 2 to Python 3 migration has been incredibly painful, and there are still a huge number of people on Python 2. Ditto for Ruby 1.8 to 1.9.

      Javascript has had a nightmarish compatibility and upgrade story.

      Scheme and Erlang are fairly rigidly specified.

      Clojure is young enough that breakage is treated as expected between versions.

      Lisp is a whole family of languages - but if you mean Common Lisp, it's been extensively tied to an essentially fixed spec for a very, very long time.

      for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-14 20:22 GMT
Find Nodes?
    Voting Booth?

    No recent polls found