Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64714 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26722 invoked from network); 9 Jan 2013 02:10:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2013 02:10:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.177 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.214.177 mail-ob0-f177.google.com Received: from [209.85.214.177] ([209.85.214.177:38733] helo=mail-ob0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/EA-16636-0A1DCE05 for ; Tue, 08 Jan 2013 21:10:40 -0500 Received: by mail-ob0-f177.google.com with SMTP id uo13so1682407obb.8 for ; Tue, 08 Jan 2013 18:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=agaobyIfnw7YH5Ig74Ekzun6zV1Pq9nGOE2lebcY0KM=; b=FJAu++p2yI/shumydC6s0GodnkrOidCQ03wyS11cT3uEJF3bwWtxxYcTP8LNfu9lRO D7+k4621sdnrmCentJHU3O+cWuy6TWf3TAUj3hxdI+P9g5of+7x3539mqSnyhHzZmxbk EL9rNCy9Cfy8UJCnvxvpHf7ppBFcFi9/EDC+MGbHuwJ6by9x3tMMQDSSP/3Ux3YM22xp BkYuRYcl2moH18x3fx3i50Dykv3TGQlBqr8lj1jrgVUFxCJ2ORD77U1Nxf/C/Mdo91dL xkBlLPi2zHUTTVyYwB3eRBsjqioZRAX3V77GLalnTjcc4KVh1zYg9KOc1fIKZFWG1L43 0+OQ== Received: by 10.60.171.133 with SMTP id au5mr37312057oec.90.1357697437744; Tue, 08 Jan 2013 18:10:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.174.68 with HTTP; Tue, 8 Jan 2013 18:10:17 -0800 (PST) In-Reply-To: References: Date: Tue, 8 Jan 2013 21:10:17 -0500 Message-ID: To: Rasmus Schultz Cc: Vladislav Veselinov , PHP internals Content-Type: multipart/alternative; boundary=bcaec54fae3a7d3ded04d2d191d0 Subject: Re: [PHP-DEV] [RFC] Reflection annotations reader From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --bcaec54fae3a7d3ded04d2d191d0 Content-Type: text/plain; charset=UTF-8 Hi, At the time Pierrick and I worked on annotations patch, we couldn't use some of the operators due to many different reasons: @ = error supressing [] = short array syntax {} = scopr creation : = all sorts of problems you can imagine & = array referencing We actually found that <> was allowed, so we used this one. Now that short array syntax has evolved a lot from original patch, maybe [] is supported again. On Tue, Jan 8, 2013 at 8:08 PM, 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')] > > > > {Foo('bar')} > > And presumably none of the following would work either: > > ~Foo('bar') > @Foo('bar') > ^Foo('bar') > *Foo('bar') > &Foo('bar') > :Foo('bar') > > Can you think of anything that would work? > > > On Tue, Jan 8, 2013 at 3:57 AM, Vladislav Veselinov > wrote: > > > Assume that you have this class with your proposed syntax: > > > > [SomeAnnotation('somevalue')] > > class Test { > > > > } > > > > This conflicts with the short array syntax. It looks like an array > > containing the result of the function 'SomeAnnotation' invoked with > > the parameter 'somevalue'. > > The only difference is the missing ";" but relying on this to > > determine whether this is an annotation or not would be insane. > > I'd support such a decision but with other syntax. > > > > I like Guilherme's RFC. I just don't think that the syntax is very > PHPish. > > > > > -- Guilherme Blanco MSN: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --bcaec54fae3a7d3ded04d2d191d0--