Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103669 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19008 invoked from network); 2 Jan 2019 20:50:12 -0000 Received: from unknown (HELO tbjjbihbhebb.turbo-smtp.net) (199.187.174.11) by pb1.pair.com with SMTP; 2 Jan 2019 20:50:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.net; s=turbo-smtp; x=1547054572; h=DomainKey-Signature:Received: Received:MIME-Version:References:In-Reply-To:From:Date: Message-ID:Subject:To:Cc:Content-Type; bh=IuhkA1WiVZAlJuxDjpShSB C2rE1pmItkHrauKA2E89s=; b=C/e6Tg00h0jlV/jb1VMFVuh0FKmrOfKEgE2knD rbriIIX0HycAjcTjJivWu29RcFTs0jGvCwe2/KG1WBf53n5B5auL2bE0Zkp42if5 aRMEWsxPrWCHr9kJM/GRYIOG4NLEOvIW1J6r8AXEFQ+P+4PtTsMhwzQnCyc7zfhz AwiDM= 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=q5TdTXtv9fn/ClW0kfhJ6q1tn1jMEAZWijgOGQclw/rXvThpq9JkQh2O0jdggE OX8dNWOoUjKs1twOA98JuPMEjOO/vlsXNUfHbH1Ynv0P2QjS5ziyy747rt+s7dPt BMBV6va62NaAdQ8xtIqpeP11dNGfPb2MafhgpffKxpJag=; Received: (qmail 4767 invoked from network); 2 Jan 2019 17:22:52 -0000 Received: X-TurboSMTP-Tracking: 4771008947 X-Gm-Message-State: AJcUukejRhBN+4/Mf+VR6MRqTeW0zZHbxR9EVxVdumfAeOsyQ31wxZnF OHlKfueL++9gkUiphguADfv+LCiAz5IT/uAddm4= X-Google-Smtp-Source: ALg8bN4wh/DvNPte1HIY7F+JaSu2z33EOnkf1Uw0bwG4Q2Gali1oKjFonU0OXl6l9xZ9/m0cvYtMEZJSghmxLzoKT8M= X-Received: by 2002:a37:8383:: with SMTP id f125mr41492772qkd.49.1546449771708; Wed, 02 Jan 2019 09:22:51 -0800 (PST) MIME-Version: 1.0 References: <94f5feb8-6589-3a0a-2849-7679cec1858c@gmx.de> In-Reply-To: Date: Wed, 2 Jan 2019 19:22:40 +0200 X-Gmail-Original-Message-Id: Message-ID: To: Nikita Popov Cc: Stanislav Malyshev , "Christoph M. Becker" , PHP internals Content-Type: multipart/alternative; boundary="0000000000004e4885057e7ce55d" Subject: Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting From: zeev@php.net (Zeev Suraski) --0000000000004e4885057e7ce55d Content-Type: text/plain; charset="UTF-8" On Wed, Jan 2, 2019 at 6:11 PM Nikita Popov wrote: > On Wed, Jan 2, 2019 at 12:33 PM Zeev Suraski wrote: > I don't expect this to be a particularly large issue for two reasons: > > 1. Not many people use this. I'm sure that there *are* people who use this > and use it intentionally, but I've only ever seen reference to this issue > as a bug or a gotcha. > 2. Even if somebody is using this functionality, the only thing that's > going to happen is that their number display switches from 1,5 to 1.5. > That's a minor UX regression, not a broken application. It's something that > will have to be fixed, but it's also not critical, and for a legacy > application one might even not bother. > FWIW, neither of these are very convincing for me: 1. I'm not sure what you mean "not many people use this"? People don't convert floats to strings? 2. Perhaps you meant they weren't proactively relying on this behavior, which could be true - but it doesn't matter whether people were expecting or otherwise desiring this behavior when they wrote the code. Whatever the current behavior is - they adjusted for it, and ended up using it, consequently relying on it. 3. I view a UX change as a big deal. As we should in a language that is very commonly used to create UI. 4. This could effect not only UX, but also integration code. You could have PHP output feeding into something else - and suddenly, the format breaks. With the fix HAVING to be in the other side, no less. I fail to understand how we could consider changing such a fundamental element (to-string behavior of floats) without an in-depth discussion. We mustn't. I think we should just put this to an RFC vote. We regularly have these > types of discussions, and people just disagree about level of anticipated > BC break relative to benefit of the change. > The point of an RFC is, in fact, to have these discussions. This is what we're doing right now. This is what the RFC process is all about - not the vote. It sounds to me as if you're saying "what's the point of discussing, let's just vote" (waiting out the two weeks as needed), with which I would wholeheartedly disagree. Apologies if you meant something else. Zeev --0000000000004e4885057e7ce55d--