Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-15 Thread Larry Garfield
On 05/10/2016 03:48 PM, Benjamin Eberlei wrote: On Tue, May 10, 2016 at 8:29 PM, Dmitry Stogov wrote: Hi internals, I've started voting on "PHP Attributes" RFC. https://wiki.php.net/rfc/attributes In my opinion, "PHP Attributes" might be a smart tool for PHP extension,

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-12 Thread Rasmus Schultz
> What happens if you say <<$x>> and then call $reflection->getAttributes() in > your eample? what is $x? > > That is the problem with immediately evaluating everything non "constant". > There is no context. There's is no context. Annotations should be context-free - that's by design. There's

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-12 Thread Benjamin Eberlei
On Thu, May 12, 2016 at 9:02 PM, Rasmus Schultz wrote: > My problem with this PSR is you've created something that strongly > resembles function or constructor calls, but in reality is just > key/value pairs. > Its actually function calls, not constructors calls :-) > >

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-12 Thread Rasmus Schultz
My problem with this PSR is you've created something that strongly resembles function or constructor calls, but in reality is just key/value pairs. That's confusing in itself, but also puts an unnecessary burden on consumers who have to figure out how to map this apparently "something" to

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-12 Thread Marco Pivetta
On 12 May 2016 at 16:29, Benjamin Eberlei wrote: > On Tue, May 10, 2016 at 8:29 PM, Dmitry Stogov wrote: > > > Hi internals, > > > > > > I've started voting on "PHP Attributes" RFC. > > > > > > https://wiki.php.net/rfc/attributes > > > > > > In my opinion,

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-12 Thread Benjamin Eberlei
On Tue, May 10, 2016 at 8:29 PM, Dmitry Stogov wrote: > Hi internals, > > > I've started voting on "PHP Attributes" RFC. > > > https://wiki.php.net/rfc/attributes > > > In my opinion, "PHP Attributes" might be a smart tool for PHP extension, > but it's not going to be the end of

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Rowan Collins
On 11/05/2016 05:46, Joe Watkins wrote: I would not vote in favour of a patch that does not include support for AST, that's a completely different feature. Arguably, with the right choice of extension methods, an implementation requiring a single scalar could be extended to support arbitrary

[PHP-DEV] Re: outRe: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Joe Watkins
get the same power >>> translating string values of attributes into AST in the hooks. >>> >>> Thanks. Dmitry. >>> >>> >>> >>> Cheers >>> Joe >>> >>> >>> >>> On Wed, May 11, 2016 at 6:26 AM, D

[PHP-DEV] outRe: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Dmitry Stogov
ional call to ast\compile_string(). Thanks. Dmitry. *From:* Joe Watkins <pthre...@pthreads.org <mailto:pthre...@pthreads.org>> *Sent:* Wednesday, May 11, 2016 7:46:09 AM *To:* Björn Larsson *Cc:* Dmitry Stogov; PH

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Benjamin Eberlei
t; >> proposed, and a hookable compiler; Anything else is not good enough. > >> > >> > >> Personally, I'm for AST as well, but it's possible to get the same power > >> translating string values of attributes into AST in the hooks. > >> > >> T

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Joe Watkins
16 at 6:26 AM, Dmitry Stogov < <dmi...@zend.com> >> dmi...@zend.com> wrote: >> >>> Hi Joe, >>> >>> The sense in native support for AST is questionable. >>> >>> >>> On one hand this allows syntax verification. >>>

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Dmitry Stogov
On 05/11/2016 10:27 AM, Stanislav Malyshev wrote: Hi! Personally, I'm for AST as well, but it's possible to get the same power translating string values of attributes into AST in the hooks. Extending this, it's also possible to get the same power just extracting phpdocs and applying AST to

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Stanislav Malyshev
Hi! > Personally, I'm for AST as well, but it's possible to get the same power > translating string values of attributes into AST in the hooks. Extending this, it's also possible to get the same power just extracting phpdocs and applying AST to them. -- Stas Malyshev smalys...@gmail.com --

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Dmitry Stogov
11, 2016 7:46:09 AM *To:* Björn Larsson *Cc:* Dmitry Stogov; PHP internals *Subject:* Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes Morning Dmitry, I'm not really happy with the voting options here. I would not vote in favour of a patch that

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Joe Watkins
rsed into AST with just one >> additional call to ast\compile_string(). >> >> >> Thanks. Dmitry. >> >> >> -- >> *From:* Joe Watkins <pthre...@pthreads.org> >> *Sent:* Wednesday, May 11, 2016 7:46:09 AM >&

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Dmitry Stogov
Thanks. Dmitry. *From:* Joe Watkins <pthre...@pthreads.org <mailto:pthre...@pthreads.org>> *Sent:* Wednesday, May 11, 2016 7:46:09 AM *To:* Björn Larsson *Cc:* Dmitry Stogov; PHP internals *Subject:* Re: [PHP-DEV]

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Joe Watkins
he other hand simple string may be parsed into AST with just one >> additional call to ast\compile_string(). >> >> >> Thanks. Dmitry. >> >> >> -- >> *From:* Joe Watkins <pthre...@pthreads.org> >> *Sent:* Wednesday, May 11, 2016 7:46:09 AM >&g

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-11 Thread Joe Watkins
--- > *From:* Joe Watkins <pthre...@pthreads.org> > *Sent:* Wednesday, May 11, 2016 7:46:09 AM > *To:* Björn Larsson > *Cc:* Dmitry Stogov; PHP internals > *Subject:* Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes > > Morning Dmitry, > > I'm not really happy with the voting

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Dmitry Stogov
<pthre...@pthreads.org> Sent: Wednesday, May 11, 2016 7:46:09 AM To: Björn Larsson Cc: Dmitry Stogov; PHP internals Subject: Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes Morning Dmitry, I'm not really happy with the voting options here. I would not vote in favour of a patch that does not i

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Joe Watkins
Morning Dmitry, I'm not really happy with the voting options here. I would not vote in favour of a patch that does not include support for AST, that's a completely different feature. As it is, I have to vote yes in favour of AST, but it may be counted as a vote in favour of

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Björn Larsson
Den 2016-05-11 kl. 00:00, skrev Dmitry Stogov: On 05/11/2016 12:29 AM, Björn Larsson wrote: Den 2016-05-10 kl. 20:29, skrev Dmitry Stogov: Hi internals, I've started voting on "PHP Attributes" RFC. https://wiki.php.net/rfc/attributes In my opinion, "PHP Attributes" might be a smart

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Dmitry Stogov
On 05/11/2016 12:29 AM, Björn Larsson wrote: Den 2016-05-10 kl. 20:29, skrev Dmitry Stogov: Hi internals, I've started voting on "PHP Attributes" RFC. https://wiki.php.net/rfc/attributes In my opinion, "PHP Attributes" might be a smart tool for PHP extension, but it's not going to be

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Björn Larsson
Den 2016-05-10 kl. 20:29, skrev Dmitry Stogov: Hi internals, I've started voting on "PHP Attributes" RFC. https://wiki.php.net/rfc/attributes In my opinion, "PHP Attributes" might be a smart tool for PHP extension, but it's not going to be the end of the world, if we decided to live with

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Dmitry Stogov
On 05/10/2016 11:48 PM, Benjamin Eberlei wrote: On Tue, May 10, 2016 at 8:29 PM, Dmitry Stogov > wrote: Hi internals, I've started voting on "PHP Attributes" RFC. https://wiki.php.net/rfc/attributes In my opinion, "PHP

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Benjamin Eberlei
On Tue, May 10, 2016 at 8:29 PM, Dmitry Stogov wrote: > Hi internals, > > > I've started voting on "PHP Attributes" RFC. > > > https://wiki.php.net/rfc/attributes > > > In my opinion, "PHP Attributes" might be a smart tool for PHP extension, > but it's not going to be the end of

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Rasmus Schultz
A couple of quick comments - I'm sorry, I haven't had time to get them in before now. In my opinion, this is pretty bad, for one primary reason: these are just names and values. The advantage of this over parsing doc-blocks at run-time is pretty limited - you can basically only guarantee syntax,

Re: [PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Fleshgrinder
On 5/10/2016 8:29 PM, Dmitry Stogov wrote: > Hi internals, > > I've started voting on "PHP Attributes" RFC. > > https://wiki.php.net/rfc/attributes > > In my opinion, "PHP Attributes" might be a smart tool for PHP extension, but > it's not going to be the end of the world, if we decided to

[PHP-DEV] [RFC] [VOTE] PHP Attributes

2016-05-10 Thread Dmitry Stogov
Hi internals, I've started voting on "PHP Attributes" RFC. https://wiki.php.net/rfc/attributes In my opinion, "PHP Attributes" might be a smart tool for PHP extension, but it's not going to be the end of the world, if we decided to live with doc-comments only. Thanks. Dmitry.