On 7/15/04 5:55 PM, David Wheeler wrote:
> I kind of like it, but only in environments where attributes are virtually
> always READ, and rarely WRITTEN. So maybe it should be:
> 
>    # Perl-style
>    $d->day; # accessor
>    $d->day(1); # mutator
> 
> Or:
> 
>    # Java-style
>    $d->get_day; # accessor
>    $d->set_day(1); # mutator
> 
> Thoughts?

The first one, definitely.  The get_/set_ style always strikes me as a poor
fit for a "dynamic" language like Perl.  Plus, think of the Perl 6 version
of DateTime.  MMD will give you thee best of both worlds: separate methods,
both "named" the same thing :)

-John


Reply via email to