Re: [RFC] Simple Annotations
| From: | Larry Garfield | Date: | Tue, 17 May 2016 16:05:15 +0000 |
| Subject: | Re: [RFC] Simple Annotations | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93379@lists.php.net to get a copy of this message | ||
On 05/17/2016 04:22 PM, Rasmus Schultz wrote:
I'd like to finish this RFC, but I have two remaining issues. The syntax is a minor issue - since any valid PHP expression can be used, the bit-shift ambiguity is technically an issue, however marginal. A lot of people commented on the syntax when I posted the RFC on reddit - they don't like it. Anyone have any ideas for an alternative syntax? It needs to be delimited, e.g. needs to use opening and closing delimiters or a recognizable opening delimiter... Here's some ideas: @{ new Table("user") } @[ new Table("user") ] {{ new Table("user") }} +{ new Table("user") } I don't like any of these really, but the bit-shift operator isn't going when the stuff inside is an expression which could include bit-shift (is it?) The other issue is the dependency (context) injection example - no one seems to be able to cite an actual use-case, and if that's the case, I should probably just remove it from the RFC entirely? @Larry can you think of a case example in the myriad annotations you've seen in Drupal code? :-)That's on my todo list for later this week. :-) I'm recently arrived in Paris so jetlagged beyond coherent thought at the moment, but I will see what I can do on a Drupal case study. --Larry Garfield