Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123017 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 118FA1A009C for ; Sun, 7 Apr 2024 14:38:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712500736; bh=w44NPzLj6M9fw4nCgWBQFnOqJrZXH674RasF1FATxxg=; h=Subject:From:In-Reply-To:Cc:Date:References:To:From; b=EP7+lqDKkdNWcwAT9vIAWN05Il7yrGl7MRfZIex4TiV+mLfgjlcKJ+4/D2HrCMVtb cbf+bAi7iDCu921WUA+GMNe6K/lvq8WBWjpFRVEqixMDmzZINCacH4bqY/WE1aNEGD ztf0CFlvMx5uRDp8m1lPa1Y5T1Xivw3T9vQ+LcDQMr5hr/9Cc2336HJLjPvQb+enAD if7RTS63ICR3injBpSqHi0eFSZJZSIz4Fpq6r4eOgpxKN5BMsixHEWbVY5qks68CXg +UlOwDOm/pJQuEkLYm7o8LbETUYOU1067F4b3IYoiAed8ocW2977iaeLWzC5HrcM7l ULszNhGNMZgcg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 86037180A4B for ; Sun, 7 Apr 2024 14:38:53 +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 mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 7 Apr 2024 14:38:51 +0000 (UTC) Received: from smtpclient.apple (unknown [117.55.37.250]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 6CF63401F4; Sun, 7 Apr 2024 23:38:17 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1712500697; bh=w44NPzLj6M9fw4nCgWBQFnOqJrZXH674RasF1FATxxg=; h=Subject:From:In-Reply-To:Cc:Date:References:To:From; b=Qj7QzwPbpIN39fdQaFwcviNXpfVWyxdajWjNje4uCh/bsXTTExQ/DyjUqz5OBgCO9 4QBg0+7EStd7xe8rytYHpjfNPeIAMcXtNOpMGDl9Zi9PfNztHdFevK0v6s8UChm7S3 1g+n4a1k3jR0Tv6jUHPZ4Qp4+0Qcckcl60huSRJU= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (1.0) Subject: Re: [PHP-DEV] Native decimal scalar support and object types in BcMath - do we want both? In-Reply-To: <40553F28-2EC2-475A-BD8E-1D6517AA2A51@rwec.co.uk> Cc: internals@lists.php.net Date: Sun, 7 Apr 2024 23:38:04 +0900 Message-ID: <2B518F62-B774-45C9-82A2-EF6653AAE34E@sakiot.com> References: <40553F28-2EC2-475A-BD8E-1D6517AA2A51@rwec.co.uk> To: "Rowan Tommins [IMSoP]" X-Mailer: iPhone Mail (21D61) From: saki@sakiot.com (Saki Takamachi) Hi Rowan, > While I appreciate that that was the original aim, a lot of the discussion= at the moment isn't really about BCMath at all, it's about how to define a f= ixed-precision number type. For instance, how to specify precision and round= ing for operations like division. I haven't seen anywhere in the discussion w= here the answer was "that's how it already works, and we're not adding new f= eatures". > Is there anything in the proposal which would actually be different if it w= as based on a different library, and if not, should we be designing a Number= Interface which multiple extensions could implement? Then Jordan's search fo= r a library with better performance could lead to new extensions implementin= g that interface, even if they have portability or licensing problems that m= ake them awkward to bundle in core. >=20 > Finally, there's the separate discussion about making a new "scalar type".= As I said in a previous email, I'm not really sure what "scalar" means in t= his context, so maybe "integrating the type more directly into the language"= is a better description? That includes memory/copying optimisation (potenti= ally linked to Ilija's work on data classes), initialisation syntax (which c= ould be a general feature), and accepting the type in existing functions (so= mething frequently requested for custom array-like types). >=20 > In other words, looking at how the efforts overlap doesn't have to mean ab= andoning one of them, it can mean finding how one can benefit the other. I agree that the essence of the debate is as you say. However, an argument must always reach a conclusion based on its purpose, an= d combining two arguments with different purposes can make it unclear how to= reach a conclusion. If we were to merge these two debates, what should be on our agenda? It woul= d probably be reasonable to have a limited joint discussion on the common po= int between the two arguments, namely, "how to express numbers," and then re= turn to each of their own arguments. However, it is not desirable for the venue for discussion to change dependin= g on the content of the discussion, so I think it will be difficult to integ= rate them. Your hope is probably that by combining the discussions, better ideas will e= merge. IMHO, that should really be a "new discussion", perhaps in this threa= d where we're talking now. Regards. Saki=