On May 26, 11:58 am, Oleg Stepura <[email protected]> wrote:
> Do we really need to mimic the PHP syntax in annotations? As for me I
> don't like the idea of having to print quotes for key names and arrows
> just for that.

I'd like to comment on that.

It seem to me, your beef is with PHP's key/value syntax in general -
and you're but one of many (myself included) who have wished for
improvements to that in the past... for one, here's an RFC proposing
some improvements:

https://wiki.php.net/rfc/shortsyntaxforarrays

I would argue that this is a separate issue - it's a problem with PHP
syntax as such, and not something you should attempt to address or
circumvent by inventing your own syntax for things that PHP already
has syntax for. It's a path that leads to pain and confusion, endless
bug reports and an endless stream of requests for enhancements.

While you could argue that metadata is just serial data, and that we
don't need PHP syntax for that, I would argue that annotations have
the potential to be so much more - by enabling full use of PHP
language for the initialization of annotations, you're paving the way
for all manner of powerful ideas.

And if PHP's array syntax does improve in the future, bingo, you'll
have those features too.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to