Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121469 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47161 invoked from network); 26 Oct 2023 15:12:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Oct 2023 15:12:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 491C9180506 for ; Thu, 26 Oct 2023 08:12:18 -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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS20473 216.128.176.0/20 X-Spam-Virus: No X-Envelope-From: Received: from mail.online-presence.ca (online-presence.ca [216.128.176.244]) (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, 26 Oct 2023 08:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=online-presence.ca; s=default; t=1698333136; bh=1o+NXcPKU/4qlW/TcPw52C4aLNq+0Ni3xQjiMpnT6v8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=fu5hdTPSJIlHTzll+/c7JMSJs3v0hMq4gUbHvwWes+NKmeEIoadhC7tvAo+4N1b81 peXQMDALQTd1dPXXg6HMALyxVFEQ3p8lIQjx8vzYBhPyPzGxP2mzkMrrxwyw4/HCbW pj/67yY2wjuD9XYhQ8ypGhQoW+ZmPyFRunplrya+Ut4qupxfqrBkyHwSq2HjgfUDo/ ZvaZGSGJoND+RQprnQQa3vW2KpEYOFEt3+NeS7RK3cGEK9F+wgKBWjubwa9H1J/ZR0 f+9KUMHFwaGXRoXygTOB+PoAsp6bSGYrmz/7GgnmjzrWFXGzRlHwsUaTypxYLh86UH aQASQxgkHDcGA== Received: from [10.0.0.211] (S01064075c3d865eb.ed.shawcable.net [70.74.109.64]) (Authenticated sender: lanre@online-presence.ca) by mail.online-presence.ca (Postfix) with ESMTPSA id 8ECC91055BB for ; Thu, 26 Oct 2023 15:12:16 +0000 (UTC) Message-ID: <8e4d5fee-cb4b-449c-9c0b-2079388995f1@online-presence.ca> Date: Thu, 26 Oct 2023 09:12:15 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: internals@lists.php.net References: <9EBE37E9-1A93-4D8E-B6D4-136B40E85431@sakiot.com> Organization: Online Presence In-Reply-To: <9EBE37E9-1A93-4D8E-B6D4-136B40E85431@sakiot.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Basic Type Alias From: lanre@online-presence.ca (Lanre Waju) Hi Saki, I will have to disagree as the convenience doesn't come from the complexity of union types, rather how many times its used. Its easier to use ConstantNode in 10 functions vs NodeA|NodeB|NodeC. On 2023-10-26 6:58 a.m., Saki Takamachi wrote: > Hi, > > It seems to me that there is more to lose than gain. I'm afraid that when we look at the signature, we'll be confused as to whether it's a class or a type. > > Even if these problems were successfully resolved, I feel that it would only reduce readability. I've never seen a union type complex enough to require an alias. > > Regards. > > Saki