Re: Inconsistent float to string vs. string to floatcasting

From: Date: Thu, 03 Jan 2019 17:14:45 +0000
Subject: Re: Inconsistent float to string vs. string to floatcasting
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-103677@lists.php.net to get a copy of this message
On Thu, Jan 3, 2019 at 3:30 PM Rowan Collins <rowan.collins@gmail.com> wrote: > 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". > Very interesting direction, I definitely think it's worthwhile to try and answer the question you raise and depending on what we find - implement your proposal on deprecating or semi-deprecating setlocale(). Zeev

« previous php.internals (#103677) next »