Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123036 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 D667A1A009C for ; Mon, 8 Apr 2024 10:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712571422; bh=964H+Em5Vnsk87jVKI8IS+rKDdXakJmPsayLtSuTfeE=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=hIW8G28jJRYzbTbe+Dd9UJdL1r9ENplkeM/ccvsxTyBYWg+L7ccF92ODUydIVELfz zxB6HVVKVuDO6u9DnhYBSw9Tcpm379Z2yKZZ9LorClQEhGIQ+F0WPNBpJg/vZEsoHH v2DDBkHfTXpvUBwV2/RFBJjGPFCnauWr+MpoDfPCLLKjgG96S1mHC4W9L+goJazYtX vD3CWwLnfxcDIq9/h+l/7DCAXYJLCuoWT8nSXD/7E+TwumPykqQiTM/45oww+0qsrh jCrrbTB2mgYR/r6lpzGJszGSsAQx9T8ymIo6+iv0xeVcdsYWwUb1QElOiLMSA9elWq EgD2TNjOZAStg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7D64B1805D2 for ; Mon, 8 Apr 2024 10:17:01 +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 ; Mon, 8 Apr 2024 10:16:59 +0000 (UTC) Received: from smtpclient.apple (193.211.49.163.rev.vmobile.jp [163.49.211.193]) (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 2DCDB401E2; Mon, 8 Apr 2024 19:16:25 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1712571385; bh=964H+Em5Vnsk87jVKI8IS+rKDdXakJmPsayLtSuTfeE=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=ekdNN+Nkh2p5Ka+JmKc9OhY2Ck88Lj0MfaSl3K6Zn0G0ShNjZQxKMeegT5ZziK4yG 09VmV2GEXoa68T0/3TdQLDN3qHHlEqc/N6G91iOdWbP1qRLDFUrPCujZ0MyMeAkGsq 5+XXokEcADfA5LpblKrSkIBSVQhRnke6KrNbEUII= 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] Proposal: Arbitrary precision native scalar type Date: Mon, 8 Apr 2024 19:16:12 +0900 Message-ID: References: Cc: internals@lists.php.net In-Reply-To: To: "Rowan Tommins [IMSoP]" X-Mailer: iPhone Mail (21D61) From: saki@sakiot.com (Saki Takamachi) Hi Rowan, > Again, I don't think "has more than one attribute" is the same as "feel al= most like objects". But we're just getting further away from the current dis= cussion, I think. > The proposed class is called BCMath\Number, which implies that every insta= nce of that class represents a number, just as every instance of a class cal= led DateTime represents a date and time. >=20 > In the end, a class is just a type definition. In pure OOP, it defines the= type by its behaviour (methods / messages); in practice, it also defines th= e properties that each value of the type needs. >=20 > So I am saying that if you were designing a class to represent numbers, yo= u would start by saying "what properties does every number value have?" I do= n't think "rounding mode" would be on that list, so I don't think it belongs= on a class called Number. We should cool down for now. At the very least, this is the place to discuss= Alex's proposal, not to comment on my RFC. If a deeper discussion is needed, we can do that in a new thread. Regards. Saki=