On 17/02/15 14:49, Andrey Andreev wrote:
>> I agree.  It's more of a question of eliminating potentially dangerous
>> > conversions than just being lossless.
>> >
> Agreed as well. However, while bool -> int conversion one of the
> reasons why many people want strict type-hints, it also often makes
> sense and is quite widespread. There's no silver bullet for that
> problem.

Returning 'not-zero/empty' as true and 'zero' as false is one of the
natural things to use in PHP and I don't think any other language has
that flexibility? It is also why some of the other 'little changes' such
as hard coded IS_TRUE and IS_FALSE are actually somewhat alien!
Certainly is does not play well with my methods of working, but then I
prefer a function to return a result rather than crash out with an
exception ... Although -ve values are even more useful than a simple
'zero' return and that may replace a string return.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

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

Reply via email to