Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78688 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40122 invoked from network); 4 Nov 2014 22:20:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 22:20:22 -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.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:52147] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/66-02095-42159545 for ; Tue, 04 Nov 2014 17:20:21 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 2F2042400DD; Tue, 4 Nov 2014 17:20:17 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RU6ugbagAHrz; Tue, 4 Nov 2014 17:20:16 -0500 (EST) Received: from oa-res-26-28.wireless.abdn.ac.uk (oa-res-26-28.wireless.abdn.ac.uk [137.50.26.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id E2B3324005D; Tue, 4 Nov 2014 17:20:14 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: <545945A5.2090204@sugarcrm.com> Date: Tue, 4 Nov 2014 22:20:12 +0000 Cc: "guilhermeblanco@gmail.com" , Benjamin Eberlei , Pierre Joye , Levi Morrison , PHP internals , Larry Garfield Content-Transfer-Encoding: quoted-printable Message-ID: References: <5457AF2F.90808@php.net> <5457BDB7.8070701@garfieldtech.com> <54589A8D.3020607@sugarcrm.com> <1C3F4FA3-ABD5-4F6F-A898-F63AC1C723D5@ajf.me> <54591A76.8070302@sugarcrm.com> <967E30E5-71CB-40F8-9AE2-733D327DE197@ajf.me> <545945A5.2090204@sugarcrm.com> To: Stas Malyshev X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] Annotation PHP 7 From: ajf@ajf.me (Andrea Faulds) > On 4 Nov 2014, at 21:31, Stas Malyshev wrote: >=20 >> This brings the next piece of the puzzle. We have to update lexical = and >> semantical understanding of PHP. Taking Java's approach (@) does not >> work in PHP, because it conflicts with error supression. Same thing >=20 > Except for the mental context, how @ conflicts with errors? = Suppression > is always in runtime context and applied to expressions, annotations = are > always outside of it and apply to declarations. Unless of course you > want to annotate variables and closures, but I'm not sure annotating > expressions is such a good idea anyway At the top-level, @ is a shift/reduce conflict due to ambiguity between = statement annotation and expression. Though it might be possible to work around that with the AST (ew). -- Andrea Faulds http://ajf.me/