Hi Stas,

> On 23 Jan 2015, at 23:42, Stanislav Malyshev <smalys...@gmail.com> wrote:
> 
>> The only reasonable behavior for <==>, <==, >== would be raising
>> error/exception if type differs.
>> E_RECOVERABLE_ERROR may be used.
> 
> Comparison operators raising exceptions doesn't sound like a very nice
> thing to work with.

I agree. As I’ve already mentioned, I have used (sometimes still do use) the 
relatively obscure Game Maker Language, which made this mistake. 1 == “1” is an 
error, “1” < 1 is an error, and so on. It is incredibly impractical, especially 
since you’ll sometimes get the “wrong” type when errors happen, just like how 
in PHP a function might return FALSE or NULL if it’s given the wrong arguments. 
Compare that value, and bam, your game just crashed! I really don’t think we 
should make the mistake of copying GML here.

Thanks.

--
Andrea Faulds
http://ajf.me/





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

Reply via email to