[m-rev.] for review: add is_leap_year/1 and days_in_month/2
Julien Fischer
jfischer at opturion.com
Sat Mar 21 03:19:04 AEDT 2026
On Sat, 21 Mar 2026 at 01:53, Zoltan Somogyi <zoltan.somogyi at runbox.com>
wrote:
>
>
> On Fri, 20 Mar 2026 23:32:25 +1100, Julien Fischer <jfischer at opturion.com>
> wrote:
> > On Fri, 20 Mar 2026 at 21:17, Zoltan Somogyi <zoltan.somogyi at runbox.com>
> > wrote:
> > > Almost all of that is good, so commit it. I don't particularly like
> > > either the documentation or the implementation of the leap year test,
> > > but it is easier for me to make changes and post them for review
> > > than to describe them.
> >
> > Committed.
>
> My proposal is attached. The main point is to avoid nested exceptions
> in the description, and making the code follow the description directly.
> N mod 25 is not faster than N mod 100, so I don't see how its negative
> effect on readability would be worth it.
>
That's fine. It uses one more rem than the previous version, but since
that's down a branch that will rarely be executed that's alright.
Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260321/c4870442/attachment.html>
More information about the reviews
mailing list