2 ms·
There are a ton of hacks in the Perl parser and interpreter that use context to support otherwise irregular syntax. For example, autovivification: https://en.wi
by wahern 6y ago
There are a ton of hacks in the Perl parser and interpreter that use context to support otherwise irregular syntax. For example, autovivification: https://en.wikipedia.org/wiki/Autovivification https://en.wikipedia.org/wiki/Autovivification DWIM is the goal behind TMTOWTDI.
Things like sigil's are useful in this regard because they provide hints that allow extending the language w/ irregular syntax, like with autovivification. Perl wasn't designed; it slowly accreted features as use cases emerged, moderated by implementation constraints, and that was intentional.
Python code today is nowhere near as simple as 20 years ago. Python, Java, and similarly aged languages are ending up w/ a cornucopia of mismatched language syntax and semantics much like Perl, except Perl was never blind to the inevitable. Lua is one of the few exceptions, but that's because Lua has gone through a couple top-down redesigns in addition to its more regular backward compatibility breaks.