Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64711 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18871 invoked from network); 9 Jan 2013 01:08:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2013 01:08:51 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.220.170 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.220.170 mail-vc0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:39856] helo=mail-vc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/99-16636-223CCE05 for ; Tue, 08 Jan 2013 20:08:51 -0500 Received: by mail-vc0-f170.google.com with SMTP id fl11so1089797vcb.29 for ; Tue, 08 Jan 2013 17:08:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=o5UjexUsGWxbe7rayJ7FRpXPHIUakAgFNifRXGCQpDI=; b=fDcb4XjfDjns5AzP+61OETXZJL3Zo+Qb7IdqA/vcGdGz7g8+sR7dQEEIMxuw6P2aKg 0uZdGzN+Ds3k8tDuTl2vhzFkl9XhsHPeC+LeWw6wMlMgVFEt+3xK3/YzDuvr6jksiSEA n/+s3sGqzinS4tL22VICMrfeITpaZN53BXsalKZGPu2Lbc4WY07VvnEEodMCicIZ0P6e YmxvvLJZxJHdABpoExre3NHwYQ+MYKdsZuqD5mUZLqRcvEOpAln7yODUOVQB9KpWsOA4 meNQA/qKeC5nmfWH0g00TrlbaA1i4z6aDxBm4dSQk13qUpHpB8EjFqdC1uP/KNEN5e4w tHGQ== MIME-Version: 1.0 Received: by 10.52.240.165 with SMTP id wb5mr77291172vdc.102.1357693728237; Tue, 08 Jan 2013 17:08:48 -0800 (PST) Received: by 10.58.102.137 with HTTP; Tue, 8 Jan 2013 17:08:47 -0800 (PST) In-Reply-To: References: Date: Tue, 8 Jan 2013 20:08:47 -0500 Message-ID: To: Vladislav Veselinov Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=20cf307d011a62a7a404d2d0b427 X-Gm-Message-State: ALoCoQl5OZv0dxztr3VmgZyXHnuwT6Nt+pQSSssRYrhsvJP5MyqHYcmeIyzn5A3Agp1kYOm9ULSh Subject: Re: [PHP-DEV] [RFC] Reflection annotations reader From: rasmus@mindplay.dk (Rasmus Schultz) --20cf307d011a62a7a404d2d0b427 Content-Type: text/plain; charset=ISO-8859-1 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. > > --20cf307d011a62a7a404d2d0b427--