Foreach Closures?

Ary Manzana ary at esperanto.org.ar
Tue Apr 10 19:50:43 PDT 2012


On 4/10/12 2:46 PM, Jacob Carlborg wrote:
> On 2012-04-10 04:24, Andrei Alexandrescu wrote:
>> On 4/9/12 9:21 PM, Ary Manzana wrote:
>>> Yes, D definitely needs that. The Eclipse plugin could just use bindings
>>> to the D compiler API with JNI.
>>
>> Would the JSON compiler output help?
>>
>> Andrei
>
> No, it's no way near sufficient for what Descent can do and what's
> expected from an IDE these days, think JDT for Eclipse.
>
> Descent can handle:
>
> * Syntax highlighting
> * Semantic highlighting
> * Show lex, parse and semantic errors
> * Compile time debugging
> * Compile time view
> * Formatting
> * Show the actual type of an inferred or aliased type
> * Smart autocompletion
> * Many other things as well
>
> Note that in addition to (most of) the above, JDT can handle a lot more.
> The compiler is the only tool that can properly handle this. It's also
> the only sane approach, to have the compiler usable as a library.
>
> Just take a look how it used to be (and in some cases are) in the C/C++
> world before Clang and LLVM came a long:
>
> * You have the compiler
> * An IDE with a "parser/compiler"
> * The debugger with an (expression) "compiler"
>
> All these "compilers" are different and need to stay in synch. That's
> not how you do good software development. You build a compiler library
> that can be used in all the above tools. BTW, it's only the real
> compiler that can handle everything properly.

Yes. In fact, JDT has a built-in Java compiler in their implementation. 
Maybe it was easier to do it for them because the Java spec is easier 
and doesn't fluctuate that much as the D spec. And JDT used that 
compiler all over the place for getting all those IDE features.



More information about the Digitalmars-d mailing list