Re: [RFC] Simple Annotations
| From: | Pedro Cordeiro | Date: | Tue, 28 Jun 2016 19:10:15 +0000 |
| Subject: | Re: [RFC] Simple Annotations | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94315@lists.php.net to get a copy of this message | ||
> << HttpMethod::post() >> // equivalent to static method-call
> HttpMethod::post()
>
What would this, specifically, do? Would it call HttpMethod::post() when
the class gets instantiated and return its return on a
ReflectionClass::getAnnotations()? Why is it necessary to be able to
evaluate expressions on annotations? I do agree that throwing
errors/exceptions when classes are not found is needed (otherwise we wont
be able to use value-objects), but evaluating expressions seems a little
crazy for me... why should metadata be computed in runtime?