3 ms·
I kind of like that; it's nostalgic for me. Most of my early career was spent writing Perl code, and in Perl it's possible, and common, to write optional add-on
by DougWebb 9y ago
I kind of like that; it's nostalgic for me. Most of my early career was spent writing Perl code, and in Perl it's possible, and common, to write optional add-on modules that give you new core language syntax. (Not everything is possible, but you can go a long way.)
For example, Perl 5 only has barebones support for OOP, and the community developed various approaches to fuller support. It was kind of like the way we've had multiple Javascript frameworks trying out various approaches to MVC. Eventually, Moose[1] was developed and became the most popular approach, and my understanding is that it greatly influenced the core support for OOP in Perl 6.
If you look at the docs for Moose, a lot of the syntax which looks like core language keywords is actually made of functions defined in the module.
This approach is great for letting the community of language users figure out what works and what's needed in the language, so that the language can evolve naturally instead of being designed by a detached committee. Again, it's much like the way Javascript is evolving, where the core language has been picking up features that were originally developed as add-on libraries.
[1] http://search.cpan.org/~ether/Moose-2.2006/lib/Moose.pm http://search.cpan.org/~ether/Moose-2.2006/lib/Moose.pm