dmd support for IDEs

language_fan foo at bar.com.invalid
Mon Oct 12 05:26:32 PDT 2009


Sat, 10 Oct 2009 18:19:56 -0700, Walter Bright thusly wrote:

> In my discussions with companies about adopting D, the major barrier
> that comes up over and over isn't Tango vs Phobos, dmd being GPL,
> debugger support, libraries, bugs, etc., although those are important.
> 
> It's the IDE.
> 
> They say that the productivity gains of D's improvements are
> overbalanced by the loss of productivity by moving away from an IDE. And
> what is it about an IDE that is so productive? Intellisense (Microsoft's
> word for autocompletion).
> 
> So, while I'm not going to be writing an IDE, I figure that dmd can
> help. dmd already puts out .doc and .di files. How about putting out an
> xml file giving all the information needed for an IDE to implement
> autocompletion? There'd be one .xml file generated per .d source file.
> 
> The nice thing about an xml file is while D is relatively easy to parse,
> xml is trivial. Furthermore, an xml format would be fairly robust in the
> face of changes to D syntax.
> 
> What do you think?

Another point not mentioned here is that modern IDEs use incremental and 
interactive compilation model. The compiler should be run as a persistent 
background process and parsing should happen perhaps on the level of the 
current scope. Re-compiling a million line project after each key stroke 
simply makes no sense. Even compiling the current module once per key 
stroke is too slow.

Specifying an intermediate json/xml file format is a huge task 
considering the amount of language constructs, types etc. available in D.

I'm all for good tool support but as many have already mentioned, the 
support would only bring marginal improvements to small scale tools like 
vim and emacs. Usually small scale D projects (< 10000 lines of code) are 
written with those tools (feel free to prove me wrong). These are not the 
kinds of projects large enterprises would use D for, they use scripting 
languages for smaller tasks. Thus the overall improvement is minimal. 
Spending the time on critical compiler bugs on the other hand would help 
everyone in the community.



More information about the Digitalmars-d mailing list