[m-rev.] for review: add int32.clamp/3

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Mar 4 16:06:49 AEDT 2026



On Wed, 4 Mar 2026 16:02:50 +1100, Julien Fischer <jfischer at opturion.com> wrote:
> On Wed, 4 Mar 2026 at 15:47, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
> > I would prefer for this function to have a more expressive name;
> > clamp_into_range, perhaps.
> 
> I'm not overly fussed. clamp is the usual name for this operation in
> programming languages that provide it, so I went with that.

I figured as much, which is why I left that part; e.g. a search for clamp
in our documentation will find clamp_into_range. On the other hand,
if everyone just copies less-than-ideal names, then readability
will never improve.

Zoltan.


More information about the reviews mailing list