Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118714 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53074 invoked from network); 30 Sep 2022 09:04:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Sep 2022 09:04:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 30B831804A7 for ; Fri, 30 Sep 2022 02:04:49 -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=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 ; Fri, 30 Sep 2022 02:04:48 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id i26so5878357lfp.11 for ; Fri, 30 Sep 2022 02:04:48 -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:references:in-reply-to :mime-version:from:to:cc:subject:date; bh=d01CJk9d7xpP23Uj+QBeqMqWS1auorzlTJQoQkewnLI=; b=XrSmb1N7RfObz6Q4KUS/xGxlKI1a2Il8ztsLws60woTf8XYRud6w/xnZOM72RL4MUu sBPYQS5j1MA5JXarIKCwh9sGCKgPww8GD04I9MSjbwlvpsb62VZn3U0BQSMmZKu6Mvvo MWbcnUFYTPaBm/6tlrceGgZVr5GNQktf+8VLE7YDnT2YBvDFbTFcAzMEaK5GdHaAldPz WanO/2HO3MG9hC52XDglaVtM2wccTWuVu+jW4xo5aFxvpQDPEtdTlob9PvY6zSQlABNT CVWGnI3gxUPDHadANFifNLLKNAx4cy4lDpKLudi3xFTLogiPD8Ecls2L/NwwtwhPN/7n iXww== 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:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=d01CJk9d7xpP23Uj+QBeqMqWS1auorzlTJQoQkewnLI=; b=eLI5YZbjaUw65T1LIxafF9pQ5sOAtSDIZTmHu+BXCsXTqjBa8EYyc2HcEU6C10+Wqo V3KP9slKZ6wVGPUzZ7gUFiwMCnwBjX1Tush2QhwIAJO6/rDWVxIUmh3w34gVlrlA2ziR sFOC5UTC/Rvs+64J6ib+znsrNzlKIpLC2wN5kuAeNmVSW2hXHG+xee6CNBOYgkJ8tzyk 0RA8vx3zuKUB0jz3ZYQYlSKKiu9guH02Ki/5YS9S5c5mh5Lbr6UkBRvWEoPVSSq5vKyY h6hnwbOTf2I+XabTNgYcuMkx6/UjwkfFjkkpIrcVo4IxKsO9dfM8bI1SDodQe+epawTe uT7w== X-Gm-Message-State: ACrzQf3O+UsESsZRKM1Y2Qz78maueBwBkYjkmf3YIamXLAl9jDUrqPWT rnm8OM+tkZRBtZTcbR2MIv29SxcxC3nAbNCQcy4= X-Google-Smtp-Source: AMsMyM5+SJZ+30aFUf+X7KF6VtBBi1ZMLMzeEX59KuuGtKhLKYCbFSRUL1GhDzW3TACNcEpLiuQbgk4gChfvPtBvBmk= X-Received: by 2002:a05:6512:3584:b0:49f:517a:19da with SMTP id m4-20020a056512358400b0049f517a19damr2876109lfr.25.1664528686910; Fri, 30 Sep 2022 02:04:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5303:0:0:0:0:0 with HTTP; Fri, 30 Sep 2022 02:04:46 -0700 (PDT) In-Reply-To: References: Date: Fri, 30 Sep 2022 11:04:46 +0200 Message-ID: To: Hamza Ahmad Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: Alias for `int|float` From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) 2022-09-29 5:08 GMT+02:00, Hamza Ahmad : > 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. Note that my suggestion here is NOT about a project-global type alias, but an extension of the existing file-only alias, the use-statement. This can also explain the lack of reaction. :) Internal devs might already have consensus on the right way to proceed here, even if there's no RFC yet. Olle