On 10-08-11 12:03 AM, Josh Davis wrote:
On 11 August 2010 02:50, Stas Malyshev<smalys...@sugarcrm.com>  wrote:
Hi!

First of all, I am talking about the typehinting syntax and mechanism
here. As Derick pointed out, current typehints are strict.

Talking about "strict" vs. "non-strict" for class types is meaningless.

By "strict" typehints I meant that no typecasting occurs. Personally
I'm not fan of the "strict" vs "weak" denomination used here either.
I'd rather call them typechecking vs smartcasting.

I'd prefer jugglehints... since I'd like PHP to coerce whatever I pass as a parameter to the "hinted" type. This is the PHP way... type juggling to save the developer the hassle. If I set a jugglehint of "int" then I would expect the value to be coerced to an integer regardless of whether 12.0, 12, "12", or "12 brown cows" is passed. The process of type juggling is well documented and has been for years. Why change that?

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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

Reply via email to