Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122007 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10314 invoked from network); 15 Dec 2023 08:14:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Dec 2023 08:14:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A4D14180038 for ; Fri, 15 Dec 2023 00:14:42 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (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 ; Fri, 15 Dec 2023 00:14:42 -0800 (PST) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-1fae0e518a4so673206fac.0 for ; Fri, 15 Dec 2023 00:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702628063; x=1703232863; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=c/VNiw9v07koC3cO20AW7zNjlmv3+Esf8JHH3cN619E=; b=QGtQlxDs3PjNTtC+tE1EoIfBOB61KI0XX+Xi6Fxp3tJ/xKF1KojpsAgydLHeH7H1p3 hf5S9eMhnvH3j4/LsKke1b8mYey2TCJQ3zJ/0V6mLqrRUQsuXZDb9Bwx0+JeCkgH6vGm 4EJeA3hob7TUyKQXUMFpZ1S/Ha06jeBQNIX0eLMp1prESAev1B0ysPXpJtk8TRpGVNJu xCZJTmHJ+/kXAoq2rryjKt5zcxIsJ2d/BUV4ElX4wy6PKS2mhou3eF6fSwJwn1JvI3oR 8iNU2TUcoeTmq5JBdHHHXNA5TEN7Zq8mGc9jSGhE7BsH+055QRIzwj7kh7M5OAUAwyGR M4cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702628063; x=1703232863; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c/VNiw9v07koC3cO20AW7zNjlmv3+Esf8JHH3cN619E=; b=vFys1wcydEm/SD+d6HzX1FWT/QZZ2B4d02jy8VI/haoDgtb2AJyRqHxFcLf+ZFHvtG yVqe9IO7YEcCHGRY9v4qs1vU4CTtEdiCa/vgdu4/NkD69PwSIXEVPN/6AdNkmlu2dA/s 9R+fIC5T+gvyL3EkKcCHE/8ByDe3cAKWsbBff11ONQU2cKOjLSGjz9Sglby20IQj3UJm CG+EGZVKHk4IpIHfcj6W8SsLpI+ll9cjiBq8f1KegK5tKSe9zYhd0LSHpwkfJ5V36+Mx 4xC+O6uoMVTXoYcKs0jRuPhRhtyfWWqUROeYhkjP326w/vUp2dRBZx4RnxFbQdHuLYAC ZAdA== X-Gm-Message-State: AOJu0YxRX36Sy0jox5bVRuuZqPs4GJbut/TOMGy7urlw2PYagwb+kGZT g9X50dkRsXyM79NJ+KT9R+EmtJ72T2Ghip7tH2Wj/gwL7Bs= X-Google-Smtp-Source: AGHT+IGV63H+2jqqknAArPtw4MfwFX2hQlIF3vxt+hMhAEhOBPgsHMYR/FhLBi1KmJe0W94OKGG+lYlo4elN2WmbpFA= X-Received: by 2002:a05:6870:aa9a:b0:1fb:788:e8a3 with SMTP id gr26-20020a056870aa9a00b001fb0788e8a3mr5837707oab.30.1702628063183; Fri, 15 Dec 2023 00:14:23 -0800 (PST) MIME-Version: 1.0 References: <18c42fdbb30.2831.17a3710df6d58f02ca570cc47e197a63@interi.co> In-Reply-To: Date: Fri, 15 Dec 2023 09:14:11 +0100 Message-ID: To: "G. P. B." Cc: Alexander Pravdin , internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Proposal: Arbitrary precision native scalar type From: landers.robert@gmail.com (Robert Landers) On Fri, Dec 15, 2023 at 2:10=E2=80=AFAM G. P. B. = wrote: > > On Tue, 12 Dec 2023 at 21:00, Robert Landers w= rote: >> >> On Tue, Dec 12, 2023 at 2:04=E2=80=AFPM G. P. B. wrote: >> > GMP supports operator overloading >> >> GMP kinda-sorta-most-of-the-time supports operator overloading. >> Sometimes ... it doesn't. I implemented a field library in PHP (for >> work a couple of years ago) and occasionally, overloading would cast >> things back to float/int and break the math. I don't have access to >> that code, so I don't have any examples readily available (and the >> fact that an extension can do overloading but we can't in user-land is >> a whole different can of worms which made this library ridiculously >> hard to work with -- we rewrote everything in Scala and never looked >> back). Needless to say, if I were to go into a project that required >> GMP, I wouldn't trust the overloading. Hey Gina, > I have no idea how _this_ is possible considering GMP will happily throw = type errors left and right even in cases when it shouldn't. > If you encountered this, you should have submitted a bug report. > Because, using a potential bug as an excuse for not doing this is... weir= d? The issue should have been reproducible on a smaller scale, but it wasn't, thereby hinting that we were hitting some extremely rare edge case that may not be easily testable. The fact that we hit it, couldn't create a simple reproduction for reporting a bug, and you should, theoretically, be able to rely on your software to compute math correctly made that one person's argument: "Why don't we rewrite this in X?" that much more persuasive... > I have come around userland operator overloading with the proposal from J= ordan, but considering this hasn't passed it might take a while before some= one gives it a crack at it again. > And it has _always_ been a thing that the engine, and internal extensions= , can do more things than userland. > Especially nonsensical stuff like variadic parameters not at the end... Considering operator overloading has been declined twice (in 2021: https://wiki.php.net/rfc/user_defined_operator_overloads, and 2020 https://wiki.php.net/rfc/userspace_operator_overloading) for "reasons" has me thinking it probably won't be proposed again. With comments like: > it is not your implementation proposal, > but rather the concept per-se that IMO shouldn't land in the language nobody will likely ever try this again, at least in the foreseeable future. With comments like that, there is simply no way forward. There's no convincing (at least via email) and by that point, it's too late anyway, they already voted but didn't even show up for the discussion that happened for weeks. Literally wasting everyone's time. The only way we'd ever get something like this passed is if someone proposes an RFC that prevents people from voting based on political/personal reasons and restricts voting "no" to technical reasons only; or some voters reopen one of the original RFC's for a revote and leave it in the "Pending Implementation" section as needing an implementation. The fact that people can and do vote "no" for no other reason than they "don't like it" or they "don't want to use it" leaves a bad taste in my mouth. Robert Landers Software Engineer Utrecht NL