Re: Basic Type Alias
| From: | Lanre Waju | Date: | Thu, 26 Oct 2023 15:12:15 +0000 |
| Subject: | Re: Basic Type Alias | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121469@lists.php.net to get a copy of this message | ||
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