Re: [RFC] [DISCUSSION] Scalar Pseudo-type

From: Date: Fri, 29 Dec 2017 12:26:31 +0000
Subject: Re: [RFC] [DISCUSSION] Scalar Pseudo-type
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-101434@lists.php.net to get a copy of this message
On 29 December 2017 12:08:16 GMT+00:00, Fleshgrinder <php@fleshgrinder.com> wrote: >What is the use case for int|float? I mean, if f is able to >process a >float than f is able to process an >int and since int is already >automatically changed to a float, well, you're done. I think it is somewhat tedious if we discuss every possible pair of types, just as it would be somewhat messy if we added a new keyword for every combination we found a use case for. The beauty of a general-purpose syntax is precisely that a user can use whatever combination they need, and not use combinations they don't need. I'm sure there are plenty of nonsensical or redundant checks that can be expressed in other parts of the language, but that doesn't mean those language constructs are useless or damaging. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#101434) next »