Re: Long awaited line directive
| From: | Sara Golemon | Date: | Mon, 07 Aug 2006 18:09:19 +0000 |
| Subject: | Re: Long awaited line directive | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25237@lists.php.net to get a copy of this message | ||
> As to the syntax I prefer not to add a new kind of syntax ala #foo. We
> introduced declare() {} a few years ago exactly for these kind of cases.
> We
> designed it so that it'd be completely extensible and functionality like
> this could be added.
>
I agree that this is the type of thing that declare() was setup for, however
I think there's value in keeping the same semantics as C for this feature.
This particular feature is a little unique in that it's (A) not a BC
breaking piece of syntax (older versions just see a comment), and (B) Having
the directive skipped (as a comment) doesn't impact code flow or the
resulting output.
I'd personally rather see:
#line "foo.re" 123
style syntax, but don't see a major problem with using:
declare(file="foo.re" line=123);
Just my 2 cents;
-Sara