4 ms·
I love Raku. Perl faced the same sort of pressure as PHP did to modernize and get rid of insanity, but where PHP modernized by sweeping all the insanity under t
by pie_flavor 4y ago
I love Raku. Perl faced the same sort of pressure as PHP did to modernize and get rid of insanity, but where PHP modernized by sweeping all the insanity under the rug, Raku leaned into the insanity and invented brand new modern forms of it. Global variables getting you down? Just use dynamically scoped variables, where assignment follows the call stack. Automatic conversion between strings and ints annoying? Stick it in the type system and let user-defined types implement the behavior too. Hate nulls? Use the class object itself as a typed null.
So much of the language is so fundamentally different from how languages are made in Current Year that I couldn't begin to evaluate how useful or confusing these features are in the wild (especially operators like `ff`); I simply have zero context whatsoever for it.
- webstrand 4y agoDynamically scoped variables have been around for a long time, and have existed in perl since version 4. I don't know which language first introduced them, but the Bourne Shell had them (and I suspect perl inherited them, like many other things, from shell). I do wish they were offered in more languages.
- sekia 4y agoAFAIK original LISP is the oldest language with dynamic-scoped variables. Although these were introduced as an implementation bug at first, and modern dialects (Scheme / Common Lisp) eventually replaced them with lexical-scoped variables, dynamic-scoped variables are still supported with different syntax in them (parameter objects in Scheme and special variables in CL.)