On Wed, 11 Aug 2010, Johannes Schlüter wrote:

> On Wed, 2010-08-11 at 00:03 +0200, Kalle Sommer Nielsen wrote:
> > type hinting
> 
> For the record: I consider the current implementation as (one of) the
> biggest mistakes in the last ten years.

I will try to sum up my view point once more:

1. right now we *have* strict type checks for classes and arrays in the 
   form of "classname" or "array"
2. the strict scalary type hint patch reuses this same syntax in the 
   form of <type-name> to do the same thing in function arguments
3. we have casting type hints in the rest of the code in the form of 
   "(int)".

Some people don't like strict typehints, but the syntax as it currently 
is regarding type hints is *consistent*. Now, to allow both strict and 
casting hints, the logical step seems to be, to give the weak typehint 
advocates their tool as well:

4. We add casting typehings to function arguments in the form of "(int)" 
   so that that is consistent as well. We would need to figure out 
   whether we want:
   a. warnings on conversions (my choice)
   b. no warnings

This:

- keeps the syntax consistent
- allows both strict and weak typehints

Should make everybody happy (enough), right? 

regards,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to