Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64744 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21789 invoked from network); 9 Jan 2013 14:58:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2013 14:58:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 209.85.212.170 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:41425] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/D9-02684-0958DE05 for ; Wed, 09 Jan 2013 09:58:25 -0500 Received: by mail-wi0-f170.google.com with SMTP id hq7so589929wib.3 for ; Wed, 09 Jan 2013 06:58:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=zQS55zBtsWrMbE5OhIJ6XoTM4JN/82+aZFtfSkAwrpw=; b=N+xiNBSvRmLUfe1AlxZjYqrnN78z9Y/aPOsfqh9c6npGSKBK+bFqtQVvr7KFXMWIWh Kt21O9Ox9ffMV5tw6FsGKsTM9dC4cGYFZAUSsVKeZnm1lHN3f6rEkL2gWFX9c2pfjQyi 0pZyGphElhR9JeTsVLLDD5DQUeECgffZJI4MzwvzaYkQz3ahj6bqnH3zpvJ6QIyLGLSm hS3nhfg5aIRcrRn80ChTb3+Qnwpq1EUNETbr7cCw5TrIKlHOWubuK45Svqnk8DR1vgAc bV64JDOJ57+a7LxCdbFpGC29X+Thng++4U3nGm6GhIxg4CbCEFone75dyJYKdYqiYmsD Aaug== MIME-Version: 1.0 Received: by 10.194.20.231 with SMTP id q7mr108722550wje.44.1357743501544; Wed, 09 Jan 2013 06:58:21 -0800 (PST) Received: by 10.194.59.36 with HTTP; Wed, 9 Jan 2013 06:58:21 -0800 (PST) X-Originating-IP: [77.13.202.63] In-Reply-To: <50ED4C18.3090806@zerocue.com> References: <50ED4C18.3090806@zerocue.com> Date: Wed, 9 Jan 2013 15:58:21 +0100 Message-ID: To: Clint Priest Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=047d7b4512081b0cb704d2dc4b77 X-Gm-Message-State: ALoCoQndvffQxfJTe5SeD5L1TI+th6rdb16+o/TwxFowH+tFc1TAatUoynUOEZKHnTxeZWSEey7B Subject: Re: [PHP-DEV] - True Annotations From: kontakt@beberlei.de (Benjamin Eberlei) --047d7b4512081b0cb704d2dc4b77 Content-Type: text/plain; charset=ISO-8859-1 I think this RFC syntax is outdated. We can remove the whole new syntax and just make everything between <> php code that returns the last statement because of the array short syntax this ends up to be stuff like: <['foo' => bar']> <['foo' => foo()]> <['foo' => new Foo('bar')]> This would greatly simplify the feature, because then its just PHP code and everybody allready knows that. On Wed, Jan 9, 2013 at 11:53 AM, Clint Priest wrote: > 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 > --047d7b4512081b0cb704d2dc4b77--