Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80500 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72822 invoked from network); 14 Jan 2015 22:33:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jan 2015 22:33:18 -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.199 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.199 imap11-2.ox.privateemail.com Received: from [192.64.116.199] ([192.64.116.199:37283] helo=imap11-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/51-00659-DAEE6B45 for ; Wed, 14 Jan 2015 17:33:17 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 546F38800A2; Wed, 14 Jan 2015 17:33:15 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap11.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap11.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lP4I4aVkc9xE; Wed, 14 Jan 2015 17:33:15 -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 016348800DA; Wed, 14 Jan 2015 17:33:13 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: Date: Wed, 14 Jan 2015 22:33:11 +0000 Cc: Robert Stoll , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <89065BA9-7D1E-43DE-881F-CF15C38AA27F@ajf.me> References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <000301d02fd3$456ab390$d0401ab0$@tutteli.ch> To: marcio3w@gmail.com X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: ajf@ajf.me (Andrea Faulds) Hi Marcio, > On 14 Jan 2015, at 18:52, Marcio Almada wrote: >=20 > We still have a BC break but now we also have code with **mutant** = behavior that might become buggy (do unexpected things) if a `declare` = is used. As a language user and a package maintainer it would be a huge = problem. Imagine how would be to maintain a package that can be used = with both strict and coercive type checking. We would have to write 2x = more tests and yet pollute code with manual type checks (is_string, = is_integer) for the non strict runtime mode when type check is = necessary. I don=E2=80=99t see why this would create =E2=80=9Cmutant=E2=80=9D or = =E2=80=9Cbuggy=E2=80=9D behaviour. You always get the type you ask for: = the weak behaviour is precisely the same as in v0.1. The strict = behaviour is fairly intuitive. In no case will you ever receive the = wrong type. I don=E2=80=99t understand. -- Andrea Faulds http://ajf.me/