4 ms·
According to Larry Wall: "use Lingua::Perligata; If you allow a language to mutate its own grammar within a lexical scope, how do you keep track of that clean
by tl 19y ago
According to Larry Wall:
"use Lingua::Perligata;
If you allow a language to mutate its own grammar within a lexical scope, how do you keep track of that cleanly? Perl 5 discovered one really bad way to do it, namely source filters, but even so we ended up with Perl dialects such as Perligata and Klingon. What would it be like if we actually did it right?
Doing it right involves treating the evolution of the language as a pragmatic scope, or as a set of pragmatic scopes. You have to be able to name your dialect, kind of like a URL, so there needs to be a universal root language, and ways of warping that universal root language into whatever dialect you like. This is actually near the heart of the vision for Perl 6. We don't see Perl 6 as a single language, but as the root for a family of related languages. As a family, there are shared cultural values that can be passed back and forth among sibling languages as well as to the descendants."
I'd say Perl is getting comparable macro-level functionality. Perl also has one likable feature that is less present in lisp; different idioms look different. When I hear Paul Graham talk of (a i) being an array index or a function call, I start to think about concepts like Hungarian notation to keep my code more readable.
A uniform syntax structure isn't required for macros.
- tokipin 19y ago> "so there needs to be a universal root language, and ways of warping that universal root language into whatever dialect you like." sounds like XML > "A uniform syntax structure isn't required for macros." it makes it a lot easier! i don't understand what you mean by 'pragmatic scopes.' does perl 6 have macro functionality?