dmd support for IDEs

Phil Deets pjdeets2 at gmail.com
Mon Oct 12 07:29:37 PDT 2009


On Sun, 11 Oct 2009 09:32:32 -0500, Denis Koroskin <2korden at gmail.com>  
wrote:

> On Sun, 11 Oct 2009 05:19:56 +0400, Walter Bright  
> <newshound1 at digitalmars.com> 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?
>
> I believe it won't work. It will always be slow and incomplete.
>
> Instead, I would make it easier to embed DMD into an IDE: separate DMDFE  
>  from DMDBE, fix memory leaks, remove all the static data (so that code  
> would be re-intrable and it could work in different threads in  
> parallel), move most of DMD code into a DLL so that an IDE could  
> dynamically link with it and whatever it pleases with the source code.
>
> In fact, that's what I do right now.
>
> I'm writing my own D IDE in my spare time (in D, of course). I already  
> made a lot of progress and now it's time to start implementing source  
> code analysis.
>
> First thing I did is I made complete D bindings for C++ code. It worked  
> out quite well but it was leaking so badly that I dropped it.
>
> Instead, I started porting DMD entirely to D (except the backend, of  
> course), and I already got some great results. A few simple programs  
> compile and produce byte-perfect binaries. It's still in its early  
> stages and there is a lot of work to do, but it will be finished soon  
> (hopefully). It could probably become a part of an official  
> distribution, eventually. :)
>
> If anyone is interested and is willing to test and/or help, I will  
> gladly share my code.

I would like it if this went open so I could examine it and possibly  
contribute to it. I have wanted to do something like this, but all I have  
started so far is a GUI toolkit. I am new to D so I have not spent much  
time on it yet. It would be nice to be able to work on something more  
developed.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list