3 ms·
> In hindsight no one had a good idea about language evolution; the modern concensus is a single interpreter supporting multiple parallel versions, also called
by ilyt 4y ago
> In hindsight no one had a good idea about language evolution; the modern concensus is a single interpreter supporting multiple parallel versions, also called "editions", but (EDIT: to my knowledge) the first major language with this approach was ECMAScript 2009 (5th ed.) with `use strict` and Python 3 predated it.
Perl did it since ages. You just put
use v5.24
in header and interpreter enabled those language features on file by file basis
- Conan_Kudo 4y agoPerl's behavior was utterly broken. It worked more like how a C/C++ compiler handles language standards (by lying to you) than actually enforcing behaviors. From the toolchain and language developer side, nobody liked Perl's approach. That's why there was so much effort around Perl 6 (which became Raku) at around the same time.
- sigzero 4y agoThat isn't even remotely true and definitely was not why so much effort into Perl 6 happened. Perl 6 was a different language with Perl-ish semantics and why it was renamed to Raku to get it out of the Perl namespace. The "use version" behavior has been used forever and is not "utterly broken". It isn't even "broken" at all.
- toast0 4y agoAt Yahoo, we had a wrapper so we could have 5.6 and 5.8 installed (and later 5.8 and 5.10), and if you had use 5.6, you'd get 5.6, and use 5.8, you'd get 5.8, and neither, you'd get the default set for that machine. If you tried to run a 5.8 script on a machine without 5.8, you'd get an error as should be expected. If you ran a use 5.6 script on a 5.8/5.10 machine, I think you'd get 5.8, but I can't remember... 5.10 was less disruptive than 5.8.