Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80532 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62253 invoked from network); 15 Jan 2015 11:30:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 11:30:52 -0000 Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.172 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.217.172 mail-lb0-f172.google.com Received: from [209.85.217.172] ([209.85.217.172:63007] helo=mail-lb0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/E7-14306-BE4A7B45 for ; Thu, 15 Jan 2015 06:30:52 -0500 Received: by mail-lb0-f172.google.com with SMTP id l4so22266lbv.3 for ; Thu, 15 Jan 2015 03:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to:cc :content-type; bh=9RyUy6Hkr+ceOkzCmiGqY1RVqXwiQx6qBeDVhdGoQvI=; b=cxrwkUYV2086r+WUSfRiO0Jo+Fj4bVM/zdvq0Q5IfceHUf4VfgVoKYioCqYCqdUrPc 7pcQipXgPJUL0aH+eSNc0olVx1dCSHQsOdEZGc93/ce5ljmYSuq4TxhpRoD9cMhD8L+b 56Sii4hxngSf/f6SQDZYicKriDcA+PQaNMTE9n/N2rGoqlmeZbYqdkZ5uUhVb7VzGA6C YAPf/Eo8efRkGeE56Qs5ZpPfFtNwFsTKfpRmRswdtP7ydkVKIo6wBJlazmoPx2kmncay 0TW8/K9Jv0jxejohsiq+UjzxZiFyXB/Ul5v0nw0BgnwHVMmnoJt29i7D+DDQo94jh4Cz F0AQ== X-Received: by 10.112.160.33 with SMTP id xh1mr9335360lbb.60.1421321449040; Thu, 15 Jan 2015 03:30:49 -0800 (PST) MIME-Version: 1.0 References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <000301d02fd3$456ab390$d0401ab0$@tutteli.ch> <89065BA9-7D1E-43DE-881F-CF15C38AA27F@ajf.me> Date: Thu, 15 Jan 2015 11:30:48 +0000 Message-ID: To: Andrea Faulds , marcio3w@gmail.com Cc: Robert Stoll , PHP Internals List Content-Type: multipart/alternative; boundary=001a11c33eac14f797050caf30b9 Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: arvids.godjuks@gmail.com (Arvids Godjuks) --001a11c33eac14f797050caf30b9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 15 Jan 2015, at 0:33, Andrea Faulds : Hi Marcio, > On 14 Jan 2015, at 18:52, Marcio Almada wrote: > > 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 Fauld s Hello Andrea! Consider what a mess was register_globals and problems it had, but at least it was a global setting. Declare will work on per file basis, and it will end up even more of a mess. I think PHP development community learned that lesson and that's why you get pushback, and not only from internals, but also from the userland. Me including. Rergards, Arvids. --001a11c33eac14f797050caf30b9--