On Thu, 2008-04-17 at 10:06 -0700, Stanislav Malyshev wrote:
> Hi!
> 
> > The problem with this is that there's not much point in converting the
> > value. PHP will do that anyway, making this kind of pointless.
> 
> There would be a point since PHP might convert to different type that 
> you intended. Think of $foo = "My age is $age". If $age is supposed to 
> be int, then converting int hint might help.
> 
> > Overall, I think type hinting should work by checking the type. If it
> > does not match, raise an error. For example, int means int, not numeric
> > string.
> 
> What code scenario would make it necessary to distinguish between number 
> stored as string and number stored as binary?
> 
> > This only serves to include an additional type juggling system into php,
> > which is very confusing.
> 
> There's already type juggling in PHP, and if you find it confusing, you 
> find whole PHP and whole set of dynamic languages very confusing. I 
> guess maybe C or Java would work better then :)

I understand it very well, but why have a whole other system of type
juggling? That would be duplicating type juggling functionality that's
already in there.



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

Reply via email to