Re:Perl 7 is going to be Perl 5.32, mostly
by 7thaccount on Wednesday June 24, 2020 @02:08PM
(#23631632)
The Moose library is a pretty advanced OO library that was inspired by Common Lisp's CLOS & Smalltalk I think. Most Perl developers I know use a large amount of libraries as the language itself is lacking in many areas. A lot of people are fine with that, but I prefer kitchen-sink languages which are fairly opinionated.
[ Parent
| on HN ]
Re:Perl 7 is going to be Perl 5.32, mostly
by lizmat on Wednesday June 24, 2020 @03:03PM
(#23632393)
At least one of the inspirations of Moose, was the object system of Perl 6 at the time (now Raku https://raku.org using the #rakulang tag on social media). To create a Point class that has an x and a y attribute, you'd write:
class Point {
has $.x;
has $.y;
}
Object instantiation is then done with: Point.new(x => 42, y => 666);
Re:Perl 7 is going to be Perl 5.32, mostly
by 7thaccount on Wednesday June 24, 2020 @05:09PM
(#23633915)
Forgot about the inspiration from P6 (Raku). Thanks for mentioning Liz!
Re:Perl 7 is going to be Perl 5.32, mostly
by notyourday on Wednesday June 24, 2020 @02:59PM
(#23632329)
I'm sorry, Moose is a pig. Its startup time is atrocious. Its run time overhead is non-trivial. People who use Moose in my experience just showboat that they can do OO. Does it help? Maybe. But what it surely does is it makes a program run and startup significantly slower.
Re:Perl 7 is going to be Perl 5.32, mostly
by singingfish on Wednesday June 24, 2020 @03:44PM
(#23632946)
Things have moved on. Moose is a bit of kitchen sink. These days you would generally choose Moo first unless you really needed the meta object features. Or to get incremental Moo(se) features you’d use Role::Tiny, Class::Method::Modifiers And Type::Tiny