Chaining in Moose, Mouse, Moo and Mo
Recently, I created a new issue on Github for Mo (https://github.com/ingydotnet/mo-pm), suggesting a chained interface:
package Hello; use Mo; has 'first'; has 'second'; my $hello = Hello->new; # current implementation $hello->first('foo'); $hello->second('bar'); # result print $hello->first; # foo print $hello->second; # bar # chaining (suggested) $hello->first('foo')->second('bar');
The suggestion was rejected, providing the following reasons:
"Neither Moo nor Moose nor Mouse does this by default, and nor do the vast majority of pre-Moose accessor builders."
While this is in line with Mo guidelines
"Mo will attempt to not do the things it does in an incompatible style to the Moose family.",
the question is: why not switch to a chaining interface in Moose, Mouse and Moo, and Mo? Should this even become the default behaviour?