in reply to Re^5: Recap: The Future of Perl 5
in thread Recap: The Future of Perl 5
since there are already multiple competing modules to handle type constraints and OO in general
My main point is that Perl should provide an API for those existing competing modules to hook into the same syntactic sugar within a particular scope. I don't have any problem with there being a core way and alternatives on CPAN.
The choice is there being multiple type constraint systems which each have their own syntax, or multiple type constraint systems which at least can take advantage of a common syntax.
Like how Moose, Mouse, Moo, and hand-crafted classes can all use ClassName->new(%params) as their constructor. You can write your constructor differently, like ClassName::get_factory(parameters => \%params)->new_object() but except in unusual circumstances, most people would prefer to ease cognitive load by using the common pattern.
|
|---|