Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64722 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75104 invoked from network); 9 Jan 2013 10:53:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2013 10:53:30 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 67.200.53.250 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 67.200.53.250 mail.zerocue.com Received: from [67.200.53.250] ([67.200.53.250:57418] helo=mail.zerocue.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/41-02684-92C4DE05 for ; Wed, 09 Jan 2013 05:53:30 -0500 Received: from [172.17.0.122] (unknown [66.25.151.173]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.zerocue.com (Postfix) with ESMTPSA id 1C5B3120807 for ; Wed, 9 Jan 2013 10:53:23 +0000 (UTC) Message-ID: <50ED4C18.3090806@zerocue.com> Date: Wed, 09 Jan 2013 04:53:12 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: PHP Developers Mailing List Content-Type: multipart/alternative; boundary="------------010209070901040805050200" Subject: [PHP-DEV] - True Annotations From: cpriest@zerocue.com (Clint Priest) --------------010209070901040805050200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Just starting a new thread here to discuss true annotations vs a DocBlock Parser: RFC Referenced: https://wiki.php.net/rfc/annotations 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 the >> 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, does >> that mean those are all out of the question? >> >> e.g. thinking of concrete possible basic syntax, neither of the following >> delimiters would work: >> >> [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 and thus only before a class keyword, before a property or method declaration. In none of those scopes would [ ] be a parsing issue I believe... The one case would be at the beginning of a class, but if simply added something such as: [:SomeAttribute(xyz,abc),SomeAttribute2] It could never be confused with short array syntax and is still brief. -- -Clint --------------010209070901040805050200--