Should #line create a new namespace ?
Basile B. via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 25 00:30:49 PDT 2016
On Saturday, 24 September 2016 at 09:23:38 UTC, Dicebot wrote:
> On 09/24/2016 10:14 AM, Basile B. wrote:
>> When the file is specified, Shouldn't #line create a new
>> module ?
>> [...]
>> Currently this is not allowed, but what's the value added by
>> the filename then ?
>
> It was used to easier debug string mixins by changing their
> filename in reported errors. Now it is done by compiler by
> default and I don't know if any other use case remains.
>
> But is definitely is not intended to create a new module, D
> relies on strict 1-to-1 matching between files and modules.
Then I suggest to deprecate it. It was not totally illegitimate
to think that it allows to create a new module.
Also since no more special token sequence would exist in the
language, special token sequence could be removed completely.
More information about the Digitalmars-d
mailing list