Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81057 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96907 invoked from network); 23 Jan 2015 23:46:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2015 23:46:23 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:45461] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/80-28190-E4DD2C45 for ; Fri, 23 Jan 2015 18:46:23 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 3AE962400D3; Fri, 23 Jan 2015 18:46:20 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vMG_HIvhVhb7; Fri, 23 Jan 2015 18:46:20 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 236F32400C7; Fri, 23 Jan 2015 18:46:17 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <54C2DC7C.2060806@gmail.com> Date: Fri, 23 Jan 2015 23:46:14 +0000 Cc: Yasuo Ohgaki , Alain Williams , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <53F8A1FF-C809-4DDF-9C6F-6916C3E4F044@ajf.me> <3251D635-D97C-4738-B537-935A6CC21E19@ajf.me> <54C17E2B.80708@garfieldtech.com> <8858EE5D-7472-41F7-9C38-091043100ABF@ajf.me> <20150123100248.GQ26114@phcomp.co.uk> <54C2DC7C.2060806@gmail.com> To: Stanislav Malyshev X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Combined Comparison (Spaceship) Operator From: ajf@ajf.me (Andrea Faulds) Hi Stas, > On 23 Jan 2015, at 23:42, Stanislav Malyshev = wrote: >=20 >> The only reasonable behavior for <=3D=3D>, <=3D=3D, >=3D=3D would be = raising >> error/exception if type differs. >> E_RECOVERABLE_ERROR may be used. >=20 > Comparison operators raising exceptions doesn't sound like a very nice > thing to work with. I agree. As I=E2=80=99ve already mentioned, I have used (sometimes still = do use) the relatively obscure Game Maker Language, which made this = mistake. 1 =3D=3D =E2=80=9C1=E2=80=9D is an error, =E2=80=9C1=E2=80=9D < = 1 is an error, and so on. It is incredibly impractical, especially since = you=E2=80=99ll sometimes get the =E2=80=9Cwrong=E2=80=9D type when = errors happen, just like how in PHP a function might return FALSE or = NULL if it=E2=80=99s given the wrong arguments. Compare that value, and = bam, your game just crashed! I really don=E2=80=99t think we should make = the mistake of copying GML here. Thanks. -- Andrea Faulds http://ajf.me/