On Wed, Aug 15, 2012 at 10:06 AM, Stan Vass <sv_for...@fmethod.com> wrote:
> I'd like to also ask people to read what the intended effect of the proposal
> is instead of going into abstract discussions about how casting one class to
> another doesn't make sense (this is not what's being proposed).

I think you confused everyone by a) having "typecasting" in the title
and b) starting with the (Foo) casting syntax (so everyone assumed
that you indeed want some kind of class casts, whatever that may be).

Regarding the actual proposal, could you maybe clarify the use-cases
for this? I can see that it could be useful in principle, but your
actually named use cases confuse me somewhat. In particular, I don't
see how this would help dependency injection containers. I can see
that it helps service locators and registries, but both of those are
considered antipatterns, so there is no reason to add additional
language features for them. DICs are only used to inject top-level
dependencies, so in that case types should be fairly well covered by
parameter type hints.

Nikita

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

Reply via email to