On Sat, 4 Jul 2009, Lukas Kahwe Smith wrote: > I am publishing it a bit prematurely imho, but its not without merit > at this stage either and since I will be busy playing frisbee all > weekend, I thought I get it out there for people to comment right now: > http://wiki.php.net/rfc/typecheckingstrictandweak
Like Ilia mentioned on IRC, there is no reason why the strict type checking which he proposes is necessarily a conflict with the weak type checking. So I would much rather have seen an RFC where you are trying to make a case why we would need week type checking, instead of saying that strict type checking is bad. You might not agree with the strict type checking, but people ask for it, people have been using it and there are plenty of reasons why it is useful—whether you see it or not. So I would propose to: 1. have ilia's strict typing patch (minus scalar and numeric) 2. have a patch that also adds for casting type hints from your RFC. Those could (and should) be considered as *two* new features. As for syntax, I believe the following would be best: function add_user(string $name, string $phone_number, (int) $age) { .. } because: 1. the casting type hint "(int) $var" is used for normal casting already 2. the strict type hint "int $var" is already used for class names regards, Derick -- http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org twitter: @derickr
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php