feature request: __ARGS__ for logging (cf __FILE__, __LINE__, __FUNC___)

bearophile bearophileHUGS at lycos.com
Fri Feb 1 07:55:46 PST 2013


Jacob Carlborg:

> But to answer your question, no. It didn't cross my mind.

OK. (I have asked because syntax costs, so it's good to use it as 
much as possible, if it doesn't lead to ambiguities).


> Yes, this proposal is basically the same as macros in Scala, 
> just adapted the syntax for D.

I think Scala macros are simple to implement :-)


> It might be possible, depending on what you want/need. I'm 
> thinking you can do something like this:
>
> @foo int a;
>
> Which is replaced with:
>
> Foo!(int) a;
>
> It's a different type so depending on how you look at it you 
> could say it affected the type system.

I meant something more like (the now closed) Treehydra:
https://developer.mozilla.org/en-US/docs/Treehydra_Manual

Bye,
bearophile


More information about the Digitalmars-d mailing list