|
|
|
|
|
by gatlin
5104 days ago
|
|
I actually despise Moose as much as I despise blindly over-doing OO. To me Modern Perl meant tackling problems in a much more Lisp-inspired way (via lexical scoping, anonymous functions, closures, lists, etc) ... but in Perl. Kind of like "Higher Order Perl." I had the impression it was more a cultural shift, a renewed interest in Perl and people wielding it much differently. There's a different CPAN web interface[1], a lighter cli client[2], and everyone is on GitHub and writing hundreds of tests. I guess Moose is part of that shift but I'm torn a lot of the time - I support modern Perl but I hesitate to support blindly copying the warts from other languages just to appear modern. This[3] is a result of searching for common::sense ... yikes. [1]: http://metacpan.org
[2]: https://metacpan.org/module/App::cpanminus
[3]: https://metacpan.org/module/Real::Handy |
|
It pushed a much more declarative approach than usual, that swaps over to other projects (Moo, Mo, even Class::Accessor supports has declarations now). It has a community that is focused on best practices with regards to OO. It put introspection more in the spotlight (like the idea of getting Getopt definitions by introspecting classes).
It is also flexible, which allows for lots of extensions to its functionality. That means a lot of concepts are tried out on CPAN already. Even if someone doesn't use Moose, there is lots of OO knowledge to be found in the ecosystem. Same goes for runtime type constraints/coercions.
Then there's the p5-mop project, that would provide a common core, so many of the things above could find themselves in a much more light-weight and broadly usable variety, with side-effects like less heavy anonymous packages.
Personally, while I'm very excited about where Perl 5 has come so far, I'm even more excited by the things we haven't thought of yet.