Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103677 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49773 invoked from network); 3 Jan 2019 20:42:02 -0000 Received: from unknown (HELO tbjjbihbhebb.turbo-smtp.net) (199.187.174.11) by pb1.pair.com with SMTP; 3 Jan 2019 20:42:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.net; s=turbo-smtp; x=1547140497; h=DomainKey-Signature:Received: Received:MIME-Version:References:In-Reply-To:From:Date: Message-ID:Subject:To:Cc:Content-Type; bh=Mc/MSZPhAonkptFOLG2NPK hd1Eqtp2kS2nk2q/BJJWs=; b=WwX2LBzZMDijkuhTBQFDAnJdjShTg2N2GrSUbw 4lY9tz8A5T+KKoXooNGyK3hGlU3DcxMmIZMSAzQdoy8vtE3c207NA2qcaUnbCUZq /P5dOokoFf2o3n2qyvXOj0f96EE7NJiuT/2UT+AVwMiyVYB9j5MP3MIvUBGNO/a5 kmhEc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=turbo-smtp; d=php.net; h=Received:Received:X-TurboSMTP-Tracking:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version:References:In-Reply-To:From:Date:X-Gmail-Original-Message-Id:Message-ID:Subject:To:Cc:Content-Type; b=pJnEyi8yMiSlLsFhvdLyKi5Xb5NnNFpcBA6RHjufRDgXSfudXrYTGU6DX3vQRE iAK9RT15JkWgdmpj6b6YBItl0BvcRzyUaMiOlnHfTnYvqO/HNhjTD8nCshMMaMei YreND6yZDRGREYOBxyv9zSUMLyOh6KT7uhtaIMPV8B0BE=; Received: (qmail 30356 invoked from network); 3 Jan 2019 17:14:57 -0000 Received: X-TurboSMTP-Tracking: 4772703200 X-Gm-Message-State: AJcUuketOqdJBcGV2CF+5R1ibkZbpzhMSTMPRKSAodLdiMVBHrFoSq9Y mOGof6MpGG8Zcc1/fUsIA6aiyKXKGtrQZ0xeNEM= X-Google-Smtp-Source: ALg8bN61dweFwdTVovYzjNbKB7LkJ27sTgTrEJfhe8v9G6WN8jxlP+F+lD5XJjVM7STtWJjKb2cEH5szZXFGrACFWvY= X-Received: by 2002:ae9:dd42:: with SMTP id r63mr43463296qkf.264.1546535696958; Thu, 03 Jan 2019 09:14:56 -0800 (PST) MIME-Version: 1.0 References: <94f5feb8-6589-3a0a-2849-7679cec1858c@gmx.de> In-Reply-To: Date: Thu, 3 Jan 2019 19:14:45 +0200 X-Gmail-Original-Message-Id: Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000d98aa3057e90e6f4" Subject: Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting From: zeev@php.net (Zeev Suraski) --000000000000d98aa3057e90e6f4 Content-Type: text/plain; charset="UTF-8" On Thu, Jan 3, 2019 at 3:30 PM Rowan Collins wrote: > On Thu, 3 Jan 2019 at 09:21, Zeev Suraski 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 --000000000000d98aa3057e90e6f4--