Re: Urgent patch for traits in PHP 5.4
| From: | Stefan Marr | Date: | Mon, 16 Jan 2012 10:25:46 +0000 |
| Subject: | Re: Urgent patch for traits in PHP 5.4 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57375@lists.php.net to get a copy of this message | ||
Hi:
On 16 Jan 2012, at 11:15, yoram bar haim wrote:
> If we want __CLASS__ to be resolved at runtime (at list in case of trait),
> then what about __FILE__ and __LINE__ ? should they be resolved at compile
> time and reflect the original code in the trait or should they reffer to the
> using class (which is a problem for the __LINE__ ...) ?
I would argue that __FILE__ and __LINE__ are not referring to conceptual entities, but the literal
code. And, I guess, they are mostly used for debugging purposes to identify the relevant code. Thus,
I would not change them, but keep them as compile-time constants referring to the actual place where
they occur.
Adapting them to reflect the using classes would at least not seem to be the intuitive semantics, I
think.
Best regards
Stefan
--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax: +32 2 629 3525