Hi Lukas! On Wed, Jun 9, 2010 at 12:08 PM, Lukas Kahwe Smith <m...@pooteeweet.org>wrote:
> > On 09.06.2010, at 12:01, André Rømcke wrote: > > > Example: > > function fetchById( int $id, bool $asObject = true ) > > > > If weak type hints are accepted, type hints would be useless in this case > as > > consumer can do something strange as fetchById( true, 'foo' ) (Obviously > I'm > > not saying anyone would do this intentionally, but in a large application > > you might not have full oversight and can unintentionally pass variables > of > > wrong type or in wrong order causing issues to surface much later as > there > > are no strict type checks that would detect the mistake immediately while > > developing). > > > please read RFC's you comment on (well the following was added to the RFC 2 > or maybe even 3 weeks ago): > in your above example there would be data loss in the type cast and > therefore there would not be silent auto casting. > http://wiki.php.net/rfc/typecheckingstrictandweak I was assuming Option 1 for the example and the fact that E_STRICT like any other error would just be logged somehow in most systems, hence not stop the call from executing which would be an even bigger issue if it is an store() function. > anyway .. can we conclude this discussion? probably best if someone who is > more or less impartial would handle the call fore vote and figure out some > sensible way to let people vote on the various solutions that are proposed. +1