Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122741 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 5E3D01A009C for ; Mon, 25 Mar 2024 22:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1711406926; bh=/Wr4Yi1yMBq9sauZURtMl9AIute2tN0x51ntOK8h5AY=; h=Date:From:Subject:To:References:In-Reply-To:From; b=ZhTbtcATTbGktOgExpfUaaAXcJVtc6gPbg0dsEJ+IR+q5tu3MapSxQHXx3cU1fHSO dY9qT1QPECPPLuBz5K7Xh0LgdkR8FgSW+qJmNA0kypk/wiS8C6vXWzk0MnmegjFuyL 2LTGCJTs9HUDf8cci3ldFMawF/wJnmCsLM89G+o2cveIjM9sw+UDwjuM/rALoyRqDL zdwxG/+49a+9/g/YMPuGOP6gBt03nzEg4M14alulNOjOAqd70ud0SDDlFsxS2kUj0U eBN43PqK6KGaYTEVx4sDz9o+4eo/8HegmEkEbiVq7abYlx5OI/vjzefyzARDT4HPNg ykWbfPKJsUQ/Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 57D8918004D for ; Mon, 25 Mar 2024 22:48:44 +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=1.0 required=5.0 tests=BAYES_50,DMARC_MISSING, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,SPF_HELO_PASS,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 gliadin.co.uk (gliadin.co.uk [80.82.115.221]) by php-smtp4.php.net (Postfix) with ESMTP for ; Mon, 25 Mar 2024 22:48:43 +0000 (UTC) Received: from [192.168.0.17] (hari-18-b2-v4wan-169870-cust740.vm1.cable.virginm.net [92.239.242.229]) by gliadin.co.uk (Postfix) with ESMTPSA id 79B38FA01AF for ; Tue, 26 Mar 2024 01:48:18 +0300 (MSK) Content-Type: multipart/alternative; boundary="------------xvny1irAcJB0Zs8o0FyzawsO" Message-ID: Date: Mon, 25 Mar 2024 22:48:17 +0000 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath To: internals@lists.php.net References: <4F094EDA-5058-407D-AF39-06FD934FDE1F@sakiot.com> Content-Language: en-US In-Reply-To: <4F094EDA-5058-407D-AF39-06FD934FDE1F@sakiot.com> From: barney@redmagic.org.uk (Barney Laurance) This is a multi-part message in MIME format. --------------xvny1irAcJB0Zs8o0FyzawsO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 24/03/2024 13:13, Saki Takamachi wrote: > I want to start the discussion on the PHP RFC: Support object type in BCMath. I suggest renaming `setScale` to `withScale`. Although the docs will make clear that the object is immutable, `set` is associated with mutation and might be confusing. `with` is not as well known as a prefix but is associated with immutable objects. Also as with the value, any reason not to make the scale a pubic readonly property? --------------xvny1irAcJB0Zs8o0FyzawsO Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 24/03/2024 13:13, Saki Takamachi wrote:
I want to start the discussion on the PHP RFC: Support object type in BCMath.

I suggest renaming `setScale` to `withScale`. Although the docs will make clear that the object is immutable, `set` is associated with mutation and might be confusing. `with` is not as well known as a prefix but is associated with immutable objects. Also as with the value, any reason not to make the scale a pubic readonly property?

--------------xvny1irAcJB0Zs8o0FyzawsO--