Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69106 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82418 invoked from network); 12 Sep 2013 21:00:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2013 21:00:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.45 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.215.45 mail-la0-f45.google.com Received: from [209.85.215.45] ([209.85.215.45:37248] helo=mail-la0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/31-09838-F4B22325 for ; Thu, 12 Sep 2013 17:00:00 -0400 Received: by mail-la0-f45.google.com with SMTP id eh20so311949lab.4 for ; Thu, 12 Sep 2013 13:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YjCxUH1FRFLW1zFpNrhPY42FBg17qn9qGTj4jZB62zY=; b=j3l975+NzUUlmtIHExHq/ZfpCNQUzffEKb8pNwJFfySr9GzVQLQ9QKvq49kOD+o9m8 mmM9P8dLrlStTf/Tk/YyvulX/TENPaMjh+i1MbtOi7q/mW1dDCNHuLF8q6dA/mFrE9U5 8//uYwwKJPVdbd5/828OcnhDw9tUGGZKlc/6wocq8cC9wqDvzKAtegpgeODQqhJSrCMS mmYC4X/3imOpcV4J4Dt/H8eo3d/4sDejweN0gF/A/8Wcf05AiTGbXxblx0VNWVXQSiZv ILP2YmMKkDb+q/pA/X7JRbMoVd/y89Fw5jdSYRolOq9pENJD9tt0ZbURxVbmMC8zYrqz XRdQ== MIME-Version: 1.0 X-Received: by 10.112.168.3 with SMTP id zs3mr8973228lbb.2.1379019596161; Thu, 12 Sep 2013 13:59:56 -0700 (PDT) Received: by 10.112.148.138 with HTTP; Thu, 12 Sep 2013 13:59:56 -0700 (PDT) In-Reply-To: References: <1379018669.12435.1710.camel@guybrush> Date: Thu, 12 Sep 2013 22:59:56 +0200 Message-ID: To: Nikita Popov Cc: =?ISO-8859-1?Q?Johannes_Schl=FCter?= , Bob Weinand , Developers List PHP Mailing Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Support for keywords where possible From: pierre.php@gmail.com (Pierre Joye) On Thu, Sep 12, 2013 at 10:55 PM, Nikita Popov wrote: > I tend to agree with Johannes. I tend to agree too but I never really liked this keywords restriction. > Supporting different sets of keywords in > different locations is pretty confusing. Imho we should add this kind of > support only in places where a) we can support all keywords and b) it is > unlikely that supporting keywords there will cause issues in the future. b) can't be proofed, also the keyword problem being future ready is also a shiny myth. It is a moving target. > One such case are method names. Methods with keyword names are currently > callable using $foo->array(), because the identifier after > T_OBJECT_OPERATOR is always a T_STRING. But while you can call them, it is > currently not possible to define them as real methods. Instead you need to > forward them via __call magic, which is rather ugly. Internal classes on > the other hand can and do define methods with reserved-keyword names. E.g. > there is a Generator::throw() method. This exact case is actually a very good reason to accept this proposal. Cheers, -- Pierre @pierrejoye | http://www.libgd.org