Re: Annotation PHP 7

From: Date: Tue, 04 Nov 2014 10:54:56 +0000
Subject: Re: Annotation PHP 7
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-78626@lists.php.net to get a copy of this message
On Tue, Nov 4, 2014 at 11:28 AM, Pierre Joye <pierre.php@gmail.com> wrote: > On Tue, Nov 4, 2014 at 4:21 PM, Stas Malyshev <smalyshev@sugarcrm.com> > wrote: > > Hi! > > > >> As I do consider personal tastes important, there are times where we > should > >> listen to our users. > > > > It would be nice to take "paving the walkways" approach, but last time > > we tried, IIRC we've got into something very over-engineered. Maybe if > > we try again with more restricted scope (i.e. not trying to put a DSL > > for describing arbitrarily complex data structures into it :) it would > > be more successful this time. > > All projects mentioned in this thread use: > > �„ > úfÐxœ¸×äÚ<¤·http://doctrine-common.readthedocs.org/en/latest/reference/annotations.html > > That makes a pretty good base spec. > Being the author I can say, the doctrine annotations project is way too over-engineered/special-purpose to land in core. I agree with Stas that a much simpler approach is probably realistic. beginning pure speculation here, i see a short array like syntax like: [foo="bar", bar="baz", baz=["key": "value"]] function annotated_fn() {} Maybe even exactly short array syntax: ["foo"="bar", "bar"="baz", "baz"=["key": "value"]] function annotated_fn() {} Then $reflectionFunction->getAnnotations() returns an array. Various PHP/Userland libraries and frameworks can then stick whatever symantic on top that they want. greetings Benjamin > > -- > Pierre > > @pierrejoye | http://www.libgd.org > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#78626) next »