On Wed May 18 04:10:52 2016, dzagashev@gmail.com wrote:
Show quoted text> Again, if developer using following syntax for declaring attributes:
>
> has attr => ( is => 'rw', lazy => 1 );
>
> it is obvious, that "default" or "builder" properties are missed and
> Moo should try to find standard builder method.
Right, but rw+lazy+builder is a weird combination so I'm not sure what we'd gain by sugaring it, and, again, you've not explained why
has attr => (is => 'rw', lazy => 1);
sub _build_attr {
return 'value'
}
is an improvement over the already supported, functionally identical, and shorter
has attr => (is => 'rw', lazy => 1, builder => sub {
return 'value'
});
especially since the first one requires you to type the attribute name twice, thereby introducing more room for typos.
What does a new slightly longer way to say the same thing gain you?