> -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of Levi Morrison > Sent: Wednesday, June 15, 2016 1:51 AM > To: Zeev Suraski <[email protected]> > Cc: PHP internals <[email protected]> > Subject: Re: [PHP-DEV] [RFC] [VOTE] Union types > > On Tue, Jun 14, 2016 at 2:43 PM, Zeev Suraski <[email protected]> wrote: > > There are more than enough constructs in PHP to handle all these use > > cases, and handle them nicely. We don't need specialized constructs > > for every use case. > > To clarify here, you are saying we don't need unions because they are a > special case, yes? But you previously stated you are in favor of special > casing > the language types such as numeric? > > These are at odds.
They're not. Let me supplement what I said: We don't need specialized constructs for every use case; They make sense for ultra-common ones only, and only if the added benefit (compared to doing it using the methods currently available) outweighs the increased cognitive burden. Hence, 'numeric' makes perfect sense, while a generic Union Types feature does not. Zeev
