On Tue, Aug 14, 2012 at 1:46 AM, Stan Vass <sv_for...@fmethod.com> wrote:
> I've felt the need for this for some time.
>
> 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.

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

Reply via email to