Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122961 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 EA6B41A009C for ; Fri, 5 Apr 2024 10:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712311439; bh=MHTZ0RfSdZPQ2UVgFc+81nqJtbOOpsTqh3/EXe2JC4U=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fkV5X2VvMJpOS0WrHtPtZ1vSKG1pU7HJzTSfy1D3vXj8Ko4bogEFqDsxNHTHc3zGX 6D5NNP6agMvaegHRDwUrvORyjnCWdSRbuxx3SOQNMreda5WHdx4uGzr1BI36PV/LvD zaI2sKEHi1BarAFUgqRX+5vhr7zTV1wsCL/X6yCKWfB6pP5TQ10qSBXKZUsAutgLbE c5/EylrFkaulC9H3UeeNseLBckgROBM+ELM1BTBErcaDEv3+R9ldkjx/qDnCIxJEjW JKOazPZGMlf232CqWqw80rv38FtT2FY/Qmr9yjnoTazgaP4plTTfIHuIm0zOuFXnTA aSpCvBuqnXiyg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C1AF5180B48 for ; Fri, 5 Apr 2024 10:03:58 +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 ; Fri, 5 Apr 2024 10:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1712311407; bh=ODIgGETVNaaCJSYFTrUf3kjpsMK799SDF1zKch/8ClA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=WNcDhO2soa6pHRL+4cDNYmufoZUc/W1fQ+l8RAUGKshYMZANfh1FZ6CUsjQwQVk12 om7ZXV1DhT8dsdr9cOFsoEKWZaEhywzhVtkzhfmngpCa92tiqG5TdsTxyHp495/oCe cjS5lofOY5O2HjsrEpN9a3MLvTc4btaJCl2mnDkOkEee+51p6xW6F7h9fOZoZUXJJq 1YMTyWAVFUUpgwFggZ6tSy4tQFdABXriLFB9cgnmXL/2KdFyvidVaaIYkUwMSvfjSe 3PO6IP3fuFfk/h19hQtzDB77vxNEJE5VIPWTuZtndg1KM4LrBL3ELzvJ31hZK/K9Rl DeQRqjVHMyODQ== Message-ID: Date: Fri, 5 Apr 2024 12:03:25 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath To: Saki Takamachi , Jordan LeDoux Cc: Barney Laurance , internals@lists.php.net References: <4F094EDA-5058-407D-AF39-06FD934FDE1F@sakiot.com> <904197f4-afb5-401e-9e17-7a655c5449d0@alec.pl> <655FEA80-9AB4-4AAD-A310-70ED968C97A2@sakiot.com> <8FB87901-02D7-4934-9119-55B21CEDDA9D@sakiot.com> <65e0fc8b-ed4e-4bf8-af2d-77dc7b4bb934@redmagic.org.uk> <92F7B1F2-67EE-4276-ADE0-20181B57DF5E@sakiot.com> Content-Language: en-US In-Reply-To: <92F7B1F2-67EE-4276-ADE0-20181B57DF5E@sakiot.com> 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 4/5/24 02:20, Saki Takamachi wrote: > In other words, the concerns we are currently aware of are issues of responsibility on the user's side, and my opinion is that there is no need to give that much consideration. However, this is my personal opinion, and there may be more reasonable opinions. I've already sent a sibling email, explaining why I believe that making the Number class not final is a mistake. However I'd also like to comment on that specific bit of your email: I strongly believe in misuse-resistant APIs. Users should generally be steered towards making the right choice, even without needing to consult the documentation. For example, by making the "right choice" the easiest choice or by preventing "wrong choices" entirely. Preventing folks from making wrong choices is overall less costly than them realizing that they made a wrong choice and then being unable to change it, due to backwards compatibility or interoperability concerns. PHP has enough gotchas as it is, so for any new API making it a *great* API, not just an *okay* API should be part of the consideration. APIs within PHP need to survive for 10+ years. Best regards Tim Düsterhus