On 4 March 2010 04:20, Dave Rolsky auta...@urth.org wrote:
I like the interface, and I think it's preferable to a separate
Moose::Strict module.
However, the problem with naming the flag strict is the same problem Perl
has with the strict pragma. Strict is a very general name, which we'd be
using simply for strict constructors right now. That means if we want to add
_more_ types of strictness later, we're stuck with either changing the
meaning of -strict, or adding another flag like -this-other-strict, both
of which suck.
So with that in mind, maybe the flag needs to be more specific, like
-strict-constructor.
We could also offer a catchall -all-strict-i-mean-it flag (with a better
name) that would be explicitly documented as something that could add more
strictness later.
I think -strict = [args] seems better.
And I'm thinking about two other strict options:
* strict hierarchy, requiring all the parents are immutable
because mutable parents are considered a source of problems
* strict attribute, requiring required or default/builder or isa
= 'Maybe[...]
, in order to ensure type consistency.
--
Goro Fuji (藤 吾郎)