On Thu, Sep 7, 2023 at 11:10 PM Jordan LeDoux <jordan.led...@gmail.com> wrote:
> > As someone who maintains a math library in PHP that has its own expanded > rounding implementation, I will politely disagree. Away from zero, towards > zero, towards positive infinity, and towards negative infinity are > completely and utterly unambiguous and provide the developer with precise > control over what behavior they want. I don't see a reason to use something > that we KNOW is ambiguous when we're designing it. > > I agree. My main point was consistency. On Tue, Sep 5, 2023 at 1:34 AM Jorg Sowa <jorg.s...@gmail.com> wrote: > Thank you all for the comments. The naming brought some constructive > discussion. > > My preferred solution would be inconsistent PHP_ROUND_AWAY_FROM_ZERO and > PHP_ROUND_TOWARD_ZERO as those are friendlier to the most of developers and > are not possible to mistake with other modes. I would go even one step > further and create aliases for NumberFormatter constants to have the naming > consistent. > > Yes, this is a great way to achieve consistency, adding aliases also in NumberFormatter. Thank you, Alex