I like this patch, it adds a feature which a lot of companies and code base
would surely implement without breaking anything. The only thing I do not
like has already been mentioned, numeric and scalar are not included.

The one thing I don't dislike, but am unsure of the ease to understand by
users is the return type hinting syntax, using type casting. Maybe I am
wrong but do you think users might get confused by it since it already has
an existing purpose of transforming values to other types, maybe they will
think at glance it transforms the return type to something else? Of course
it would be fault of there own for not reading, but is it NATURAL to use the
existing type hints for it?

Why not:
function int foo($foo) { }

I understand the problem with adding the INT as a keyword, and how that
maybe:
function int int($foo) { }

is awkward, but would be rare and seems to be more correct. I know it would
be more difficult to implement the latter but it should not be impossible
should it?

Just throwing it out there, it is a nice patch and a nice feature for A LOT
of people even though it is not exactly the php way, but all things must
evolve.

-Chris

Reply via email to