$ perl -E '$_ = "A"; say; say for ("B", "C"); say;'
A
B
C
A
For me, dynamic scoping (and, relatedly, RAII) is sorely missed in languages that don't have it. (Although I do agree about $a/$b in sort -- that's a language wart, but not too bad in practice)
> - autovivification: a single read by key from a hash is enough to actually create this key;
Autovivification is another feature that I miss in languages that lack it.
Your points about the perl5 implementation are definitely accurate, although I suspect a lot of language implementations have their own dirty laundry as well. :)
Additionally, there are several misleading statements in your post. I expect you are aware of the following but just for the record:
> - pervasive global state (`$_` and friends);
Perl uses dynamic scoping (https://en.wikipedia.org/wiki/Scope_(computer_science)#Dynam...) when setting $_ and friends. For example:
For me, dynamic scoping (and, relatedly, RAII) is sorely missed in languages that don't have it. (Although I do agree about $a/$b in sort -- that's a language wart, but not too bad in practice)> - autovivification: a single read by key from a hash is enough to actually create this key;
Not true:
You need to read it as a hash or array reference for it to autovivify: Autovivification is another feature that I miss in languages that lack it.Your points about the perl5 implementation are definitely accurate, although I suspect a lot of language implementations have their own dirty laundry as well. :)