Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80552 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 867 invoked from network); 15 Jan 2015 15:58:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 15:58:03 -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.207 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.207 imap2-2.ox.privateemail.com Received: from [192.64.116.207] ([192.64.116.207:42201] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/AE-14306-AECD7B45 for ; Thu, 15 Jan 2015 10:29:46 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 53C198C0009; Thu, 15 Jan 2015 10:29:43 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id i1mlKudn5ZBw; Thu, 15 Jan 2015 10:29:43 -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 858A68C0081; Thu, 15 Jan 2015 10:29:42 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <54B7D8AE.5090209@seld.be> Date: Thu, 15 Jan 2015 15:29:39 +0000 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <9CC72DB5-A794-4D65-A781-92ED71DC59B2@ajf.me> References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <54B7D8AE.5090209@seld.be> To: Jordi Boggiano X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: ajf@ajf.me (Andrea Faulds) Hi Jordi, > On 15 Jan 2015, at 15:11, Jordi Boggiano wrote: >=20 > On 14/01/2015 00:16, Andrea Faulds wrote: >> Here: https://wiki.php.net/rfc/scalar_type_hints >>=20 >> This is a new thread because I=E2=80=99ve made a significant revision = to the RFC, so it=E2=80=99d be sensible to separate discussion of the = updated RFC from the v0.1 RFC. >=20 > Reading the thread at this point shows so much confusion, it seems = half the people reading the spec misunderstood that the declare() line = affects function calls only and not the API/implementation level. >=20 > As much I think it was a smart idea and workaround, it is perhaps too = clever for its own good if nobody gets it. >=20 > Anyway, as v0.2 appears to be v0.1 + declare(), why not keep those two = options separated in the vote? >=20 > a) should be add weak typing > b) should we also add declare() for to get strict typing at call-site. >=20 > If *a* passes it would be a great stepping stone towards adding *b* = later perhaps, or tweaking internal coercion rules to improve the = behavior of the weak types, having scalars in return hints (since return = hints seem likely to pass), etc. >=20 > If *b* passes as well great we have a complete picture and every team = can have declare() Y/N in their own coding guidelines based on = preference. I may consider another RFC that just does weak typing, or reviving v0.1 = if this RFC doesn=E2=80=99t pass. But I=E2=80=99m not really sure about = it. I=E2=80=99m not sure it=E2=80=99s fair on all the people who would = prefer a strict approach. -- Andrea Faulds http://ajf.me/