Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81639 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25429 invoked from network); 2 Feb 2015 19:36:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2015 19:36: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.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:47629] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/00-25089-7C1DFC45 for ; Mon, 02 Feb 2015 14:36:39 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 1BD6CB0008E; Mon, 2 Feb 2015 14:36:37 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rvhmTrfK2sMz; Mon, 2 Feb 2015 14:36:36 -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 78C35B0007B; Mon, 2 Feb 2015 14:36:36 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: Date: Mon, 2 Feb 2015 19:36:34 +0000 Cc: PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <1E54E93F-8CE1-469F-BE1F-DD2F1DF76E39@ajf.me> <5175DE01-ADC9-4A0B-8343-820C53B30054@ajf.me> <2AABD912-C2A3-4877-8B40-8E391B2BE45F@ajf.me> To: Dmitry Stogov X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: ajf@ajf.me (Andrea Faulds) Hi Dmitry, > On 2 Feb 2015, at 19:26, Dmitry Stogov wrote: >=20 > Agree. Strict type checks are simple and may be implemented more = efficient. > But in case we have to support both - weak and strict, this won't make = any advantage. I think this still works even if we support both. The RFC=E2=80=99s = approach means that within one file everything is strictly-typed, for = example (except in rare cases of declare() block usage). > Static analyzers can work with weak conversion rules as well. This is true, but weak conversion rules are less useful for = error-checking in practice: for some conversions, you can=E2=80=99t say = AOT if they=E2=80=99ll work or fail, just that they=E2=80=99ll = =E2=80=9Cmaybe=E2=80=9D succeed. So I think analysis of strictly-typed = code would be more effective. > Anyway, this is not directly related to run-time semantic we discuss = now. This is true. Thanks. -- Andrea Faulds http://ajf.me/