Hello John,

Saturday, May 1, 2004, 11:27:32 PM, you wrote:

> I agree with the idea that it would be nice to force an instance of a
> particular class, etc. to be passed. However, if we are going to
> introduce another keyword anyway why not keep BC intact by by
> introducing the 'force' keyword:

the point of solution 3 was not to introduce a new keyword other than null.
And adding null as a keyword dosn't have implications other that ppl may
have a fucntion called 'null'. But i don't think that happens often. Using
force or forced on the other hand seems to happen often at least i used it
myself.

> I remember discussing 'array' as a typehint (big +1 there),

good so far

> but I don't
> see anything gained from such a type-hint. When exactly would you use it
> (that you couldn't use the existing type hinting).. I guess the obvious
> answer is when you don't know the type of class being passed, but if you
> don't know that how do you plan on actually using the parameter at all? 

What are you speaking of here?
array means the parameter must be an array.
class means the parameter must be any class instance which can be used for
reflection as an example.


Best regards,
 Marcus

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

Reply via email to