On 12/29/2017 1:26 PM, Rowan Collins wrote:
> On 29 December 2017 12:08:16 GMT+00:00, Fleshgrinder
> <p...@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,
> 

I agree and I do not intend to do so, I actually am not even questioning
the usefulness of union and intersection types. I am more curious in
regards to providing a `number` type. Seems useless to me.

-- 
Richard "Fleshgrinder" Fussenegger

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to