Am 19.12.2017 um 09:49 schrieb Stanislav Malyshev <smalys...@gmail.com>:
>> The current one isn't any convention, it's just not possible to do
>> something else. There's nothing that explicitly allows saying "I accept
>> all types", rather than "The type I accept is unspecifed".
> 
> There could be of course logical constructions that are not supported by
> the type system. "mixed" however has the accepted meaning - and that
> meaning is exactly the same as not specifying the type. I do not see any
> additional use of type that only means "unspecified type" - it looks
> like its sole reason is so that somebody could say "I now have lots of
> types in my code!" which does not seem to me a worthy goal. Types should
> serve a purpose, this one serves none.

I agree, if you want to document that you code accepts mixed types you could 
simple write /* mixed */, i.e. a comment.
If you're talking about tool support then the tool could also support this 
comment. Would not be unheard of either.

- Chris


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

Reply via email to