dmd json file output

Sönke Ludwig sludwig at outerproduct.org
Tue Jan 22 00:48:02 PST 2013


Am 22.01.2013 09:02, schrieb Rainer Schuetze:
> 
> Considering function types, the deco does not contain any function argument identifiers anymore, but
> these are very useful for tooltips in an IDE like Visual D.
> 

I thought so, too. But considering that types are always subject to this problem:

---
alias StateCallback = void function(int state);
static assert(StateCallback.stringof == "void function(int state)");

alias IndexCallback = void function(int index);
static assert(IndexCallback.stringof == "void function(int state)"); // still "state"
---

... it may be better to not even make it possible to fall into this trap by excluding them. Except
if I'm wrong and the JSON output happens at an earlier stage where the parameter name information is
still tagged to the declaration, of course.


More information about the Digitalmars-d mailing list