Re: Inconsistent float to string vs. string to floatcasting
| From: | Rowan Collins | Date: | Thu, 03 Jan 2019 13:30:02 +0000 |
| Subject: | Re: Inconsistent float to string vs. string to floatcasting | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103675@lists.php.net to get a copy of this message | ||
On Thu, 3 Jan 2019 at 09:21, Zeev Suraski <zeev@php.net> wrote:
>
> I agree, but the real question is how many of those who are explicitly
> calling setlocale() are relying on this behavior
>
It occurs to me that we could ask the opposite question: what *other*
reasons do people have for explicitly calling setlocale()? If we can
provide alternatives to the majority of use cases, we can put a big fat
warning on the setlocale() manual page suggesting that people completely
avoid it - more prominent than the current one on thread-safety, mentioning
some of the other undesirable side effects, and explicitly recommending
alternatives.
Obviously, that advice won't be followed over night, but it would at least
give ammunition for people to raise PRs against libraries saying "hey,
please use this instead of setlocale() because you broke my float
conversions".
Regards,
--
Rowan Collins
[IMSoP]