Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123274 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id C41461A009C for ; Tue, 7 May 2024 18:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715106311; bh=kurdPAY4jJuOLoox2zV2mU4DgvkKgI0oPBAmxxIM7TU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=a5vgmMS+R+lLBDaGQ8TZw8T4+AyhGBKwMb2638qsGWHo2t6qg7CuJMQO64xCoQkn1 ZWnqdELpxKEWeJlx+C5ahvie1pXnmWDoxncySb2XeeTYwOBL9AWm63VeiWCVwDlP4p zk7xpe1P1lMmRRXZIBtEMKHY/ZjkWQPz/IhmjXNkWdU3YRXIrqdk9VG8oHBwPtk5BQ KczVVDJZrZrfITYmI1B4TVdjaByo5S4VO0s/WsAOOM7zQrjfjeKBsN6LfJmRk4gDkL uSCYlAogaWii/5lOs+g2kZgeHwdO030tWzChHx/QDCpfnJHBUxa1AA5kU+yjYfiREb BkSorbSNMtzwg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 74A4E180083 for ; Tue, 7 May 2024 18:25:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 7 May 2024 18:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1715106260; bh=uymfo+m9nlQaPz5VdcO9qskI6SU0dzH15Du97nebEYU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=CgNqdqLziLUnntk/zsxd9Xh3FtpS/5eZGAD6SlfNwrLchQaeb2XQjfUhMH46+5rCT txWxhQpRI7sS7p219jdIBMOYuw9ItHsEu3f+LHGCuXKQui3WhwIDPNcQt3ZRZwWe51 S5nOCvjPBXCaRNGOR5rU6NAXmnkoP0tIvVFSDTPIQM74NMaBo284wRPHQkF7zMb+mF ymmPFsxkKx5no4267pDUlzPcoh2n1qXjUk+W9gf59fVBAcgOmRPtGu0qpsifJRk1aW xLBHV3rS/nlebRZd9qmD/MlnGV0FAqMA7i6yslAiYoGQTwL152R7gmqAQoVyajc9Gj V5FRgEf4JF6Uw== Message-ID: <93bb5d8b-431b-4e89-acda-64d8ebe5bbe6@bastelstu.be> Date: Tue, 7 May 2024 20:24:16 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [vote] Support object type in BCMath To: "Gina P. Banyard" , Saki Takamachi Cc: php internals References: <58283467-CABC-4868-A691-A52228C5296F@sakiot.com> <6Kx-yDO_RoWi8qV0NDhpziE5VX-cDF3g5RCEUjqh5iOnM2x2pWtYPz0j3bNUz-BdkkIVXXG38tu8fP9FuAiQYl2oDcTYAUivNn63B10Vw9I=@gpb.moe> <9BD04F6A-95FA-4C04-AE9C-B9ACB92A9D58@sakiot.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 5/7/24 17:23, Gina P. Banyard wrote: >>> - What is the behaviour when casting a Number object to bool? Does it always cast to true like a "standard" object, or does a Number equal to 0 cast to false? >> >> >> That's a good topic. I didn't include any mention of this in the RFC because there was no discussion about it. Personally, I like to return a bool value that reflects the internal numerical state, like an int. >> >> However, since I would like to avoid adding such specifications later when voting has already begun, I will use the same as a "standard object" for now. If this RFC is passed, I will additionally propose it in another RFC. > > The lack of discussion about this topic is not a good excuse for not having addressed this in the RFC. > This topic should have come up on its own while writing the RFC as this is something that you should have considered, in the same way you have considered how casting to string works. > Moreover, RFC discussions are steered by the content of the RFC, and non-mentioned issues requires other people to consider cases that have not been explicitly address, something that is difficult. > > > I feel this RFC has been brought to a vote too early, as such I am changing my vote to no. > I am generally in favour of the concept, but there are too many details that are unanswered or didn't even get proper attention for me to feel comfortable with the state of the RFC in question. Thank you for spelling out the feelings that I had towards the RFC but wasn't able to clearly put into words myself. Unfortunately I had not seen the announcement about the vote in time, and wasn't able to give the RFC a final read before the vote. Personally I also didn't expect a vote yet, because I felt the API surface of the new class hasn't yet been given a proper thought and discussion, including all possible edge cases. Most of the discussion I remember revolved around final vs not-final and how to correctly perform the rounding / expansion of scale (the latter of which I couldn't comment on, as numeric programming is not my area of expertise), not the API surface / the methods that are exposed. As an example, my concern about the `format()` method has been left unresolved. As such, I'm also voting "no", because I feel like the exposed API is worse than it could be, but I also support the concept in principle. Best regards Tim Düsterhus