Re: [RFC] [discussion] Correctly name the rounding mode and make it an Enum
| From: | Jorg Sowa | Date: | Sun, 02 Jun 2024 21:26:14 +0000 |
| Subject: | Re: [RFC] [discussion] Correctly name the rounding mode and make it an Enum | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123486@lists.php.net to get a copy of this message | ||
> It should also be noted that ceil/floor is very English specific
terminology that may not be immediately obvious to non-English speakers,
thus my preference for using some variation of towards positive/negative
infinity.
This statement is subjective in my opinion. For me, it's the contrary,
that's why I'm opposing introducing new terms to the PHP replacing ones
that already exist (ceil()/floor()). I don't have the data on such modes in
other programming languages, but I checked the data in Google Trends:
https://trends.google.com/trends/explore?q=round%20toward%20positive%20infinity,ceiling%20math,round%20positive%20infinity,towards%20positive%20infinity&hl=en
Far more people search for
ceiling than round toward positive infinity
or round positive infinity. Of course, I may be wrong by choosing
incorrect search phrases, but it's also good to see some data/examples that
changing this in PHP is for the better.
> by *removing* the newly introduced constant and instead exposing the
functionality *only* via the new Enum.
It brings inconsistency that some modes are accessible by ints and enums
and others only by enums. If there is no deprecation plan yet I am not sure
this is the right approach.
Kind regards,
Jorg