Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42188 invoked from network); 12 Nov 2014 18:29:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Nov 2014 18:29:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=sbj.ml.read@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sbj.ml.read@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.178 as permitted sender) X-PHP-List-Original-Sender: sbj.ml.read@gmail.com X-Host-Fingerprint: 209.85.223.178 mail-ie0-f178.google.com Received: from [209.85.223.178] ([209.85.223.178:45520] helo=mail-ie0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/12-30822-627A3645 for ; Wed, 12 Nov 2014 13:29:59 -0500 Received: by mail-ie0-f178.google.com with SMTP id rp18so14179959iec.37 for ; Wed, 12 Nov 2014 10:29:56 -0800 (PST) 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=gCerCFq0tzO+F+j6CiU7yC+7e2xu6W3m8OTSNh/1tBg=; b=eyNXI2BQ0D8hvrx6tacv+axvJa+SMJOdyreiChyJ4To5qPMhPPfAkpc/A4FU6mac0z eLD3Ai3Or6XoTP3QJkxwTWGDqOs9+9ToSOYBC3EoWwPk/Id6/KS4Lb8AfDJNmHVOqgl9 bk1N4wyGtfMHgkdxccY/TK3dAPtMdS/55nJCTDurvduktAZJ9rl7Jgy05pEGmOKqY9hh aRPAuvt5oOYXLjnrBCAv4pj5zLdljmZgeDSM+sot9HWvjJoOZ6SFJlqeGa6WSzBGhgGv UZWeaHNxjS2FOSQ4KTcYrjSdLdPqtIQhNAy4NUhmgbCIMHoJZpdRCvFj0Zqi7CAByOu6 +g6g== MIME-Version: 1.0 X-Received: by 10.50.136.134 with SMTP id qa6mr42180877igb.2.1415816996314; Wed, 12 Nov 2014 10:29:56 -0800 (PST) Received: by 10.107.54.12 with HTTP; Wed, 12 Nov 2014 10:29:56 -0800 (PST) In-Reply-To: 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> <54638904.20605@gmail.com> Date: Wed, 12 Nov 2014 19:29:56 +0100 Message-ID: To: marcio3w@gmail.com Cc: Rowan Collins , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Annotation PHP 7 From: sbj.ml.read@gmail.com ("Sebastian B.-Hagensen") That might just work, but it's still close to currently possible code. Why don't we use something that would currently produce a parse error and is not as close to valid code as the examples above? <<< Annotation('abc'), foo >>> // Used <<< as it's different from T_SL, but it works for hack, so maybe drop a <> class DEF {} comes to mind. 2014-11-12 18:23 GMT+01:00 Marcio Almada : >> One problem with using *just* array syntax, without any new keyword or symbols, >> is that it is extremely close to being existing valid syntax. This may well cause problems in the parser, >> and would certainly be confusing to users. > > Not sure how sacred is `$`, but it could be a good candidate for the > annotation identifier since it denotes "something that carries a > value": > > $['package.annotation' => ['name' => 'foo']]; > class Foo { > } > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >