Hi!
>> Just because other comparison ops already return a bool, we can return
>> bool(false) there.
But we can not return bool from operator that is declared as returning
int, and adding extra type would make this operator essentially useless,
as it is meant to be a concise way of comparing two t
On Mon, Jun 15, 2015 at 4:45 PM, Rowan Collins
wrote:
> On 15 June 2015 20:55:04 BST, Bob Weinand wrote:
> >As far as I know, we made it that way in order to enforce an int return
> >type all the time.
> >int(-1) is indeed the sensible value for this. (Mainly int(0) does not
> >work because it'd
On 15 June 2015 20:55:04 BST, Bob Weinand wrote:
>As far as I know, we made it that way in order to enforce an int return
>type all the time.
>int(-1) is indeed the sensible value for this. (Mainly int(0) does not
>work because it'd mean equality and so we're left with int(-1) and
>int(1).)
>
>Jus
> -Original Message-
> From: Bob Weinand [mailto:bobw...@hotmail.com]
> Sent: Monday, June 15, 2015 9:55 PM
> To: Dmitry Stogov
> Cc: da...@php.net; Andrea Faulds; Stanislav Malyshev; Anatol Belski; Kalle
> Sommer Nielsen; PHP Internals
> Subject: Re: [PHP-DEV] Space
As far as I know, we made it that way in order to enforce an int return type
all the time.
int(-1) is indeed the sensible value for this. (Mainly int(0) does not work
because it'd mean equality and so we're left with int(-1) and int(1).)
Just because other comparison ops already return a bool, w