On Mon, 2008-01-07 at 13:16 -0500, Elizabeth M Smith wrote:
> Afternoon,
> 
> Wow, go away for a weekend and look what happens...
> 
> Personally I think the issue is that true "scalar" type hinting doesn't 
> make much sense with a dynamically typed language.  Deciding if/when/how 
> to juggle a scalar typehint is going to make at least one person angry 
> and some new user confused.
> 
> However, I have to agree with the fact that the current typehinting 
> system feels "unfinished".  I can tell a function that it has to be 
> passed an array or some specific type of object, but can't tell it that 
> it has to be passed a scalar type, or a resource, or any generic object.
> 
> These don't "juggle" well like the generic scalar (int, bool, float, 
> string) types.  Is there any reason we can't at least add "scalar" and 
> "resource" (and possibly "object" for generic objects) to typehints?  It 
> wouldn't be the full "scalar typehinting" solution that people are 
> yelling for, but it would cut out lines of bad input handling in my own 
> code, and make the current typehint solution feel more complete.

Scalar, resource, and object type hints would be very useful, and fit
perfectly with the current type juggling system. I still support all of
the hints, but these 3 alone have an even stronger argument than the
other ones.

> My own $0.02,
> Elizabeth Smith
> 

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

Reply via email to