Hi!

> Like I said, the functionality is possible without it. But what
> functionality was impossible without int/float/string type hints?

I don't think it's a good argument "if we added something to the
language, from this point on anything can be added because why not?"
Yes, you can write code in machine code, and yes, we don't do that, but
that doesn't mean any addition to syntax anybody can think of
automatically is in because we once added syntax.

> They just make it much clearer, with less repeated boiler plate, what
> arguments you can actually accept.

I don't see how it's less boilerplate - in most cases, you don't even
need it, as I said, since checking for object is in most cases is
useless, you need to check for specific type. You don't use -> on just
random object. You use it on an object because you expect to find
something on the other end of -> and only objects of specific type(s)
would have it.

In very rare cases where it might may make sense, using is_object is
only marginally longer and is very clear. It's not like it's some weird
obscure function that takes ages to understand.

-- 
Stas Malyshev
smalys...@gmail.com

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

Reply via email to