Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80121 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86839 invoked from network); 3 Jan 2015 18:06:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2015 18:06:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; 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:42950] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/00-21228-98F28A45 for ; Sat, 03 Jan 2015 13:06:03 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id CCD74B00087; Sat, 3 Jan 2015 13:05:58 -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 Ox8YdrmTFGzE; Sat, 3 Jan 2015 13:05:58 -0500 (EST) Received: from [192.168.0.13] (unknown [94.13.96.117]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id B6124B00058; Sat, 3 Jan 2015 13:05:57 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: Date: Sat, 3 Jan 2015 18:05:25 +0000 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <360F9366-07C2-4C7A-AC3C-D482AFDD9838@ajf.me> References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> To: Pierre Joye X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hey Pierre, > Thanks, great work and persistent effort! Thank you. > As I am also slightly in favor of a strict way, this RFC is a good = compromise. >=20 > Some comments: >=20 > - on-numeric strings not accepted. Numeric strings with trailing > characters are accepted, but produce a notice. >=20 > I would rather not allow fancy conversions here. Any trailing non > white spaces characters should not be allowed. I know it is not what > PHP does now in some cases but this is really a fuzzy area and never > really matched any actual needs or usages. Yeah, I don=E2=80=99t like this behaviour much. I want to avoid = inconsistency with the behaviour of extension functions (i.e. = zend_parse_parameters) where possible, though. Since this has come up so = much, I should probably make an RFC to change this aspect of ZPP=E2=80=99s= behaviour. > I am also not a fan of errors, exception, at least for methods, make > much more sense. I know it is relatively easy to handle errors as > exception but still, let do it right now. That=E2=80=99s be inconsistent with our other type hints. To get this = changed, I think we=E2=80=99ll just have to wait for Nikita=E2=80=99s = Exceptions in the Engine for PHP 7 RFC. Thanks. -- Andrea Faulds http://ajf.me/