Proposed syntax:
-------------------------
$x = (InterfaceName) $container->service;
I'm against this. Let's be honest, how different is this that an
optionally static type?
InterfaceName $x = $container->service;
To be clear, I WANT optionally static typing. For the most part,
type-hinting in class methods solves the static typing needs, but if
we were able to declare a class member to be a certain type that would
be another significant improvement. I have a proposal in the works,
but I don't want to hijack your thread.
To sum up: I think we need something LIKE what you are proposing, but
I'm against this particular proposal.
What you want is option 4 under my alternative syntaxes section :)
I'm ok with syntax 4, in fact, the more I think about it, the more I prefer
that one (the one you want).
I don't mind the syntax as much, I want the feature.
Stan
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php