Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64724 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82831 invoked from network); 9 Jan 2013 11:54:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2013 11:54:44 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:40148] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/92-02684-28A5DE05 for ; Wed, 09 Jan 2013 06:54:43 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 8B8DC10D624; Wed, 9 Jan 2013 11:54:39 +0000 (GMT) Date: Wed, 9 Jan 2013 11:54:39 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Clint Priest cc: PHP Developers Mailing List In-Reply-To: <50ED4C18.3090806@zerocue.com> Message-ID: References: <50ED4C18.3090806@zerocue.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1201280820-1357732479=:28951" Subject: Re: [PHP-DEV] - True Annotations From: derick@php.net (Derick Rethans) --8323329-1201280820-1357732479=:28951 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 9 Jan 2013, Clint Priest wrote: > Just starting a new thread here to discuss true annotations vs a DocBlock > Parser: >=20 > RFC Referenced: >=20 > https://wiki.php.net/rfc/annotations >=20 >=20 > On 1/9/2013 2:09 AM, Peter Cowburn wrote: > > On 9 January 2013 01:08, Rasmus Schultz wrote: > > > I've started working on a new proposal, but I'm getting hung up on th= e > > > syntax - if we can't use angle brackets anymore, what can we use? > > > Virtually > > > every symbol on a standard US keyword is an operator of some sort, do= es > > > that mean those are all out of the question? > > >=20 > > > e.g. thinking of concrete possible basic syntax, neither of the follo= wing > > > delimiters would work: > > >=20 > > > [Foo('bar')] > > Why would this not work? I'm struggling to think of a place where one > > would want to use an annotation where it could be misinterpreted as an > > array literal. If anything, the visual "conflict" or association with > > the array syntax is a good thing in my book: my brain parses it as an > > array of one or more annotations. > I agree here, I think the above, if possible would be best. In my mind > annotations should proabably be limited in scope to class declarations an= d > thus only before a class keyword, before a property or method declaration= =2E >=20 > In none of those scopes would [ ] be a parsing issue I believe... >=20 > The one case would be at the beginning of a class, but if simply added > something such as: > [:SomeAttribute(xyz,abc),SomeAttribute2] I've never ever seen an annotation like this in a docblock. What kind of=20 wacky syntax is this?! And will we now need a parser for docblocks in=20 style "phpdocumenter" and those annotations above=E2=80=BD cheers, Derick --=20 http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine --8323329-1201280820-1357732479=:28951--