Re: Annotations in PHP7
| From: | Crypto Compress | Date: | Fri, 20 Feb 2015 11:43:23 +0000 |
| Subject: | Re: Annotations in PHP7 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83290@lists.php.net to get a copy of this message | ||
Am 19.02.2015 um 08:14 schrieb Dmitry Stogov:
On Thu, Feb 19, 2015 at 2:12 AM, François Laupretre <francois@php.net <mailto:francois@php.net>> wrote:Hi, thank you for the answers. I understand the "anything is possible" argument and would like to see/push future ideas in direction of domain-specific languages (DSL) opposite to another aspect-oriented programming (AOP) extension as in current examples. Sorry for offtopic. Thanks cryptocompressIf I understand Dmitry correctly, this would be stored as the compiler internal representation of the 'new Entity("foo")' code, but this wouldn't be executed until an external mechanism decides to do so. So, this is PHP code and it is compiled and stored in memory besides the function opcodes, but not evaluated.Right. It's even not compiled into bytecode, just parsed into AST and then associated with function/class/property like doc-comment.You're right, it contains code. The key point is that this code will never be executed nor used in any way until an external mechanism decides to retrieve and evaluate it. That's metadata.Right again.