Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80536 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74593 invoked from network); 15 Jan 2015 14:03:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 14:03:39 -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:47540] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/99-14306-9B8C7B45 for ; Thu, 15 Jan 2015 09:03:38 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 8DCD12400AA; Thu, 15 Jan 2015 09:03:34 -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 sdzE4wqBiI6X; Thu, 15 Jan 2015 09:03:34 -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 EE7D62400D4; Thu, 15 Jan 2015 09:03:32 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <54B6FBD8.9050109@gmail.com> Date: Thu, 15 Jan 2015 14:03:30 +0000 Cc: Zeev Suraski , RQuadling@gmail.com, Leigh , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <20CF60F6-EADC-4174-8C71-163B4651447A@ajf.me> References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <4E2073DE-0951-498C-97BB-DDAC094F11FA@ajf.me> <9a033dd1f223f854e760924d118ab812@mail.gmail.com> <2ae0164cb9b9bf1c974d7a3c60af0466@mail.gmail.com> <54B6FBD8.9050109@gmail.com> To: Stanislav Malyshev X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: ajf@ajf.me (Andrea Faulds) Hi Stas, > On 14 Jan 2015, at 23:29, Stanislav Malyshev = wrote: >=20 > I agree. Being wrong is bad, making a mistake is bad, but having split > personality language and not knowing in which world you are - or even > worse, having to deal with both worlds in the same code and being = thrown > back and forth between them by some little switch which is easy to = miss > - IMO is worse. I don't like strict typing in PHP because I think it = is > contrary to the idea of how dynamic languages should work, but I'd > rather have that then two sets of rules living within the same code, > especially when looking at the function I can't even know how it would > work without checking if there's a declare hiding somewhere. And > refactoring becomes a nightmare - what if I moved function from strict > world to non-strict world or vice versa? It=E2=80=99s not about the location of the function, but the call site. = You can place a function anywhere and it will behave identically. > I also agree with Dmitry in other thread - if some conv rules are so = bad > everybody hates them (or at least you think it is the case :), we can > change them. We are already on that track with some weird ones like > array->string. Even with BC effects, IMO better than too many sets of > rules. There are some minor issues with the conversion rules that could be = fixed, but a lot of people have a problem not just with the conversion = rules, but with the implicit conversion itself. The previous RFC (Scalar = Type Hinting with Casts) wasn=E2=80=99t popular with many people for = that reason: sure, it had stricter rules, but that won=E2=80=99t please = people who want no conversion whatsoever. Thanks. -- Andrea Faulds http://ajf.me/