View mode: basic / threaded / horizontal-split · Log in · Help
October 11, 2009
Re: dmd support for IDEs
There are several core features that I absolutely must have (because I
want them):

1. autocompletion. everywhere. for everything. including local
variables. And that's not just the *pop* this symbol is a <type> that
does <ddoc>. It includes the completion part. When I type foreach
Ctrl+Space, I get a generic foreach statement (which is consistent with
the current compiler's syntax).

2. usage finding. I'm at a symbol. I want to know everywhere it's used.
If it's a class, I want to know everywhere it's subclassed.

3. code formatting.

4. build system

5. syntax highlight and code folding (easy peasy, but necessary)

6. error reporting aka dem shquiggly red lines

7. import resolution.

On top of these are a bunch of peripheral features:
When you have 1, code navigation should come pretty easy.
When you have 2, renaming any variable should come pretty easy.

When I have problems with those dang cyclic dependencies, I might want
to be able to merge two modules together.

etc


What I wanted out of my semantic analysis was a complete syntax tree and
symbol table that could make all of these things possible. If I can get
this direct from the compiler, it would obviously save me several years
of work and "yeah, this doesn't even try to be compatible" problems.


Walter Bright wrote:
> Ellery Newcomer wrote:
>> ctfe. compile time (weird connection?). what do string mixins evaluate
>> to?
> 
> No
> 
>> can I look at their result from the ide?
> 
> No

Well I want this feature.

> 
>> what do templates expand
>> to?
> 
> No
> 
>> what does this here alias/typedef represent?
> 
> Yes
> 

Good.

>> what does this here
>> typeof expand to?
> 
> No
> 
>> what does this here c-style type normalize to (in
>> d-style)?
> 
> No
> 

Well I want this feature.


>> As for other transformations, it seemed like Ary had some neat tricks in
>> descent that showed things like int i; going to int i = 0; etc. maybe
>> wistful thinking.
>>
>> while we're at it,
>>
>> when I see a symbol, can I find its type?
> 
> Yes

Good.

> 
>> can I find every symbol that
>> would follow it in a dot list/exp?
> 
> Yes

Good.

> 
>> when I see a symbol, can I find everywhere it's used?
> 
> No, but could be added
> 

Good.

>> when I see a scope, can I see every symbol that's in it?
> 
> Yes
> 

Good.

>> when I see a module, can I find everywhere it's imported?
> 
> Yes

Good.

> 
>> can I see exactly what symbols are pulled in?
> 
> No, but could be added

Good.

> 
>> Can I perform analysis to
>> show me where those dang cyclic dependencies are?
> 
> Don't know
> 

If I have the previous two I think I can do it. I might need a view of
the code after compile time expansions. Oh, and I'd obviously need to
see which modules have static ctors/dtors.

>> when I see source code, can I perform a simple walk over the xml to
>> format it?
> 
> No
> 
> 
> Think of what it provides as very similar to what ddoc does, except that
> instead of being in a human-readable format it would be a
> machine-readable one.

Yep, we're thinking of different things.

> 
> In other words, for each module you'll be able to get
> 
> . all the symbols in that module, and the members of those symbols
> (recursively)
> . the file/line of the source location of each symbol
> . the ddoc comment for each symbol
> . the type of each symbol
> 
> Things could be added over time, I was just thinking of this for starters.
October 11, 2009
Re: dmd support for IDEs
On 11/10/2009 03:19, Walter Bright 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?

FANTASTIC! Give it a go.

Despite the intention to support a D IDE ...
I would make sense to establish this feature in D1 too.
Imagine XML2D which may help to port D1 code to D2.

I would further suggest to consider to output to Oracle Berkeley DB XML ..
Having an XQuery-based access to D-sources.. I guess you can imagine 
what this could mean.

There are a couple of D IDEs around.
I think what people mean with there is no D IDE is simply : "We want a 
MS Visual Studio like IDE as part of the D tool chain" One download, 
that's it.
I agree. But we need a platform independent IDE.

Our Options :
1) Force Decent.. (Java/SWT)

2) Use gtkD, create the IDE in D. (the only usable platform independent 
 GUI atm.)

3) Use QT and C++. Let's re-use and adapt QT Creator.

Having QT as standard GUI toolkit for D means that we can also reuse the 
QT Designer.

Bjoern
October 11, 2009
Re: dmd support for IDEs
Denis Koroskin wrote:
> On Sun, 11 Oct 2009 05:19:56 +0400, Walter Bright
> <newshound1@digitalmars.com> wrote:
> 
> If anyone is interested and is willing to test and/or help, I will
> gladly share my code.

Oooo.. You should put that on dsource or somewhere. Hacking D sounds
like a lot more fun than hacking C++. I wouldn't mind helping out on
this one.
October 11, 2009
Re: dmd support for IDEs
BLS wrote:

...
> Our Options :
> 1) Force Decent.. (Java/SWT)
> 
> 2) Use gtkD, create the IDE in D. (the only usable platform independent
>   GUI atm.)
> 
> 3) Use QT and C++. Let's re-use and adapt QT Creator.
> 
> Having QT as standard GUI toolkit for D means that we can also reuse the
> QT Designer.
> 
> Bjoern

Why not QtD?
October 11, 2009
Re: dmd support for IDEs
Ellery Newcomer wrote:
> Denis Koroskin wrote:
>> On Sun, 11 Oct 2009 05:19:56 +0400, Walter Bright
>> <newshound1@digitalmars.com> wrote:
>>
>> If anyone is interested and is willing to test and/or help, I will
>> gladly share my code.
> 
> Oooo.. You should put that on dsource or somewhere. Hacking D sounds
> like a lot more fun than hacking C++. I wouldn't mind helping out on
> this one.

Guys please use D2 :o).

Andrei
October 11, 2009
Re: dmd support for IDEs
Walter Bright wrote:
> Jérôme M. Berger wrote:
>>> . all the symbols in that module, and the members of those symbols 
>>> (recursively)
>>
>>     Including local variables for functions?
> 
> That seems pointless, as they'll be inaccessible outside of the scope of 
> the function.

	The point would be for smart autocompletion: type the beginning of 
a variable name, hit the autocomplete key and the IDE offers you a 
choice of the names available at that point, i.e:
 - Global symbols (including imported ones);
 - Class members if the function is a method;
 - Local variables.

	It's also useful for member completion: type "foo." and the IDE 
offers you a list of members for foo. This requires knowing its 
class even if it is a local...

		Jerome
-- 
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr
October 11, 2009
Re: dmd support for IDEs
On Sun, 11 Oct 2009 19:10:42 +0400, Andrei Alexandrescu  
<SeeWebsiteForEmail@erdani.org> wrote:

> Ellery Newcomer wrote:
>> Denis Koroskin wrote:
>>> On Sun, 11 Oct 2009 05:19:56 +0400, Walter Bright
>>> <newshound1@digitalmars.com> wrote:
>>>
>>> If anyone is interested and is willing to test and/or help, I will
>>> gladly share my code.
>>  Oooo.. You should put that on dsource or somewhere. Hacking D sounds
>> like a lot more fun than hacking C++. I wouldn't mind helping out on
>> this one.
>
> Guys please use D2 :o).
>
> Andrei

I do, it's written entirely in D2 :)
October 11, 2009
Re: dmd support for IDEs
On 11/10/2009 16:54, Lutger wrote:
> BLS wrote:
>
> ...
>> Our Options :
>> 1) Force Decent.. (Java/SWT)
>>
>> 2) Use gtkD, create the IDE in D. (the only usable platform independent
>>    GUI atm.)
>>
>> 3) Use QT and C++. Let's re-use and adapt QT Creator.
>>
>> Having QT as standard GUI toolkit for D means that we can also reuse the
>> QT Designer.
>>
>> Bjoern
>
> Why not QtD?

See QtD at dsource ... "No Windows support... we have lost the race 
against the DMD tool chain) Further QtD has no OSX support (AFAIK)

I still hope that Walter has an eye on the QtD situation..
October 11, 2009
Re: dmd support for IDEs
On 11/10/2009 17:43, Denis Koroskin wrote:
> On Sun, 11 Oct 2009 19:10:42 +0400, Andrei Alexandrescu
> <SeeWebsiteForEmail@erdani.org> wrote:
>
>> Ellery Newcomer wrote:
>>> Denis Koroskin wrote:
>>>> On Sun, 11 Oct 2009 05:19:56 +0400, Walter Bright
>>>> <newshound1@digitalmars.com> wrote:
>>>>
>>>> If anyone is interested and is willing to test and/or help, I will
>>>> gladly share my code.
>>> Oooo.. You should put that on dsource or somewhere. Hacking D sounds
>>> like a lot more fun than hacking C++. I wouldn't mind helping out on
>>> this one.
>>
>> Guys please use D2 :o).
>>
>> Andrei
>
> I do, it's written entirely in D2 :)

Which GUI toolkit ?
October 11, 2009
Re: dmd support for IDEs
Andrei Alexandrescu wrote:
> Nick Sabalausky wrote:
>> "Walter Bright" <newshound1@digitalmars.com> wrote in message 
>> news:has92u$1vum$1@digitalmars.com...
>>> Lutger wrote:
>>>> What about file/line/column of the symbol? Is this much work / hard 
>>>> work to add?
>>> file/line of course, but I don't see a point to column.
>>
>> So the IDE knows where it is and can actually do things with it, 
>> instead of just knowing "Well, it's somewhere around here-ish."
>>
> 
> And what should the tab size be? >:o)

Let's see, how many characters are in a tab character?
1 2 3 4 5 6 7 8 9
Top | Discussion index | About this forum | D home