D parsing

Timon Gehr timon.gehr at gmx.ch
Thu Nov 14 11:34:51 PST 2013


On 11/11/2013 12:37 AM, Andrei Alexandrescu wrote:
> On 11/10/13 3:21 PM, Timon Gehr wrote:
>> On 11/10/2013 11:43 PM, Andrei Alexandrescu wrote:
>>>>
>>>> It seems we could even get rid of __FILE__,__LINE__,__MODULE__ with AST
>>>> macros.
>>>
>>> This would be a very small advantage. The special variables hardly cause
>>> any trouble.
>>>
>>> Andrei
>>
>> The trouble is that there are too few of them to (efficiently) reflect
>> all the information about the calling context one may be interested in.
>> I don't see the point in adding them one after another in an
>> unprincipled ad-hoc fashion instead of actually thinking up a good API
>> coupled with some more expressive power.
>
> But the API would add them in exactly the same rote manner.

No, it would be (close to) exhaustive from the beginning. That is the 
point. I assume the problem is that there have not yet been very 
specific proposals.

> I really don't see an advantage here.

It's the difference between having an universal language, and a language 
that has a finite and fixed set of words (without any methods of 
combination).


> An argument for macros would have to do a
> lot more than "we don't need __FILE__ etc. anymore".
> ...

Obviously, but I was not making this argument, and as far as I can see 
nobody else was either.



More information about the Digitalmars-d mailing list