Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80165 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66186 invoked from network); 5 Jan 2015 00:54:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 00:54:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:43832] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/00-00230-DA0E9A45 for ; Sun, 04 Jan 2015 19:54:06 -0500 Received: by mail-we0-f170.google.com with SMTP id w61so7067630wes.29 for ; Sun, 04 Jan 2015 16:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=w1ePePJyTSgQSJqK7f0mBxhPPJb+iDVD7XjilxsBHDY=; b=DiTlLqkaTVM/3VBCtQw3hvqjFZOCxeOmPWRrBKPMiVfobmAUpQNuSdQhhix4F3kc2M LRDkNg+rVSckThcBvwz07LED5jwjoZbdhcLAiyGeX57CfuGC5Xm7WHsuV76Rh3bKu4X+ nAwyi1b6iOnIN2jYdONTgfp0ea6C3Dnx5/KPNlqT/6MYeF5rBPnr10yLNvXArxidUGeh 1AgutRe5OjOlNUOAlYCX/Up9kzaDt5/LkvlE9r1Ia7HzY/ms9kt290N5KeVdXmlHlrVy xA8pebjpJ0rOwokltVyhVic5WsmUEz11S4A2VXwFH0jppDulCqzeOuF4zBgL3c9o9TJe NaVw== X-Received: by 10.194.81.136 with SMTP id a8mr97656439wjy.104.1420419241198; Sun, 04 Jan 2015 16:54:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.163 with HTTP; Sun, 4 Jan 2015 16:53:39 -0800 (PST) In-Reply-To: References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> <54A466CB.9020400@gmail.com> <54A9D39F.8010808@gmail.com> Date: Mon, 5 Jan 2015 01:53:39 +0100 Message-ID: To: Andrea Faulds Cc: Stanislav Malyshev , Derick Rethans , PHP Internals Content-Type: multipart/alternative; boundary=047d7beb9c8c4dcde0050bdd20c8 Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: ocramius@gmail.com (Marco Pivetta) --047d7beb9c8c4dcde0050bdd20c8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 5 January 2015 at 01:07, Andrea Faulds wrote: > Hi Stas, > > > On 4 Jan 2015, at 23:58, Stanislav Malyshev wrote= : > > > >> I think it's perfectly acceptable that PHP makes a built-in type a > >> reserved word. I would certainly not change it to PHPInt to "avoid any > >> obvious clashes". > > > > As I already pointed out, if we make it reserved word we'll have BC > > problem. We already had this experience when goto became reserved word = - > > it resulted in a lot of breakage. This would be bigger, since we adding > > more reserved words and we know they are used in a lot of class names > > (and, possibly, method names too). > > It is a BC problem, yes. However, it can be worked around in userland in = a > way where unchanged code will continue to work on PHP 5, and changed code > will work on both PHP 5 and PHP 7. I think the BC break is worth it, thou= gh > unfortunate. I also wonder why we hadn=E2=80=99t reserved these names bef= ore, it > seems rather silly that you were ever able to make a class called =E2=80= =9Cinteger=E2=80=9D > or =E2=80=9Carray=E2=80=9D. Note that this kind of BC break will gladly be fixed in major libraries out there: we can rename those classes and announce the breakages ourselves without too many problems. The best way to eagerly detect this sort of problem would be to have a php-nightly version on travis-ci, and then we could handle it ourselves and without too much pain (already trying to get there, and mbeccati has a CI system running with php7 and some major libs). The only trouble that could eventually come up is with legacy software that isn't tested at all. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --047d7beb9c8c4dcde0050bdd20c8--