Re: - True Annotations
| From: | Anthony Ferrara | Date: | Wed, 09 Jan 2013 15:20:43 +0000 |
| Subject: | Re: - True Annotations | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64748@lists.php.net to get a copy of this message | ||
Levi,
On Wed, Jan 9, 2013 at 10:15 AM, Levi Morrison <morrison.levi@gmail.com>wrote:
> > https://wiki.php.net/rfc/annotations
>
> Perhaps I am blind, but I do not see where in the RFC is defends its
> choice to use
<>. Every other language I know of uses
> @, and I do
> not know of technical reasons why we couldn't use the same symbol.
> Annotations wouldn't be able to contain expressions so there wouldn't
> be anything that could generate a suppressible error.
Think about a function declaration:
@param("bar")
function foo($bar) {}
What's the parser supposed to do there? Is it an annotation? Or an
error-silenced function call?
Granted, leaving off the ; may make it possible to parse without
ambiguity (since the @ - Const String - ( - ... - ) sequence, followed by a
function declaration direclty may be possible)...
But it's ambiguous at best (especially to read)...
Anthony