Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118703 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54443 invoked from network); 29 Sep 2022 10:33:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Sep 2022 10:33:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 99E5D180539 for ; Thu, 29 Sep 2022 03:33:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 29 Sep 2022 03:33:18 -0700 (PDT) Received: by mail-wm1-f50.google.com with SMTP id d12-20020a05600c3acc00b003b4c12e47f3so504052wms.4 for ; Thu, 29 Sep 2022 03:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=FyJ99s0IzbK8SxzV/nKY5qm7tDrCY6GL4gGbncMGbec=; b=eKnEtnTi1c9eQeLtEVWRgkoLrgTcIeqEs0fQzukQEDE3oEDshmiVyXsc3dPlDD42p8 EwvdXeT15sDzKjIhZXzktMWsvlFJHRM4G2/e8EeJvYpsUalGPY5uJmgMSv/aVIqHxk3R nXlNZx28y04WruIYo1mD9Ed4Uv8JWGYJwNcyH3uGNFDWZmo3HkMI2tnZzO6d5Qh8tVvn o/uSajDg1SMHhQmM/nkL/ERonznTkKgqRou/oQu7qcAyyuPmeoitaAdgNcczsECndeGM 0dkxHQWNESMkp+YLmnaEbg1TAptCD6cKoHKkZ99RE7+D/7HR+zIeIfO4iN6jREJxz1Qc WleQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=FyJ99s0IzbK8SxzV/nKY5qm7tDrCY6GL4gGbncMGbec=; b=eYeBYITYPfjvdEfipVwpxHZ7f9UHu+KqtHPG1IGavgcZoKnk59WqdeGO/Lte0eXDVV nBzDsFmqSl28Q9oI1/Knt1WL5Kl2ax2c60yd+bdq+3iNoFaONxcUQygUgKdVXBUaTHTU cHc2WycncSA7RoREQlBYix0xI6Z4nBFXy7pStorh0tXa1Guq2kS/DUWaJi0cscQYFyqE 5accyCHhJLEBTHpPLSyUmTrr/0p5MbDRzOH6R4Bt5L2M16dSa/llCtDiNjqy16jMUfbm Akik8wG7xcjdMuMSvP/gY//cjU3l1svIVyVr3XnB3aToMt7jNBHb0oqqV/hlCly45OgQ ghMw== X-Gm-Message-State: ACrzQf2RxueOoB2MM4CTupjb/6bGIPbAmn3CrgzqiTEn+NTEb/L/NePQ JFJ3hQQqzzXjQdkBY+VVpEF3caT7LgrM9AosErLtveIz X-Google-Smtp-Source: AMsMyM4FoqjBkMsxS1vg9121D3XObS+9RbWsXHiXCl8ty7EpcT5pFrV+3iD5sqBX7Ju2xBm7sh6m4PYMjgILT3c12Wc= X-Received: by 2002:a7b:cd8f:0:b0:3b4:92e4:c77b with SMTP id y15-20020a7bcd8f000000b003b492e4c77bmr9929264wmj.93.1664447596863; Thu, 29 Sep 2022 03:33:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 29 Sep 2022 04:33:03 -0600 Message-ID: To: Hamza Ahmad Cc: =?UTF-8?Q?Olle_H=C3=A4rstedt?= , Internals Content-Type: multipart/alternative; boundary="000000000000c2245c05e9ce67f6" Subject: Re: [PHP-DEV] Re: Alias for `int|float` From: ryan.jentzsch@gmail.com (Ryan Jentzsch) --000000000000c2245c05e9ce67f6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable `number` type But frankly this seems a bit silly and reminds me too much of JavaScript. On Wed, Sep 28, 2022, 9:08 PM Hamza Ahmad wrote: > Hi Olle, > > I appreciate your idea of introducing a similar concept of typedef. > What if you write an RFC explaining that concept. I can join you > however in co-authoring this request. > > Seriously, I have had issues with writing such type again and again. > If you look at mixed type, it is indeed an alias of some union types. > Adding such an option to userland would lead to introduction of > various type hints. Plus, it will help devs write short hand aliases > for their intersection types. > > Regards > > Ahmad > > > On 9/27/22, Olle H=C3=A4rstedt wrote: > >>Hello, internals! > >> > >>What do you think about creating shorthand `number` for `int|float`? > > > > This is also related to allow all types of type-hints in the > use-statement, > > like > > > > use int|float as numeric; > > > > Anyone interested in creating an RFC for this? > > > > Olle > > > > PS. Original thread here: https://externals.io/message/112209#112209 > > (dunno how to respond to an old thread when I don't have the original > > message) > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: https://www.php.net/unsub.php > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000c2245c05e9ce67f6--