Hi!

Derick's point was about consistency. The approach described in his
mail is consistent with current syntax and mechanism(s). Current

No it is not. There's no functions that produce errors when fed 1 instead of boolean "true" - all internal functions convert.

typehints do not apply any kind of conversion, so treating scalar
hints the same way is consistent with the current mechanism.

Current hints do not apply conversion because conversion does not exist. There can be no conversion between different classes.

Reusing the typecasting syntax for typecasting "hints" makes them more
familiar to the users, and it is less ambiguous than a typehint that
sometimes also typecasts. Plus, it allows for both "strict"

That's exactly how internal functions worked in PHP for 10 years - "sometimes" (meaning when the type is wrong) typecast. That's how the rest of the language worked for 10 years in situations like $a = $b+1. How it's "ambiguous" - what are two options that you are confused between and can't choose?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to