Java > Scala

Jacob Carlborg doob at me.com
Sun Dec 4 12:15:43 PST 2011


On 2011-12-04 20:53, Timon Gehr wrote:
> On 12/04/2011 08:50 PM, Jacob Carlborg wrote:
>> On 2011-12-04 15:38, Marco Leise wrote:
>>> Am 04.12.2011, 13:41 Uhr, schrieb Jacob Carlborg <doob at me.com>:
>>>
>>>> On 2011-12-02 22:40, Somedude wrote:
>>>>
>>>>> Yes, the IDE takes care of a lot of boilerplate code. It's ugly, but
>>>>> it's hardly a productivity issue. One other thing that's cool is
>>>>> refactoring is no longer an issue, like it is in C or C++. With
>>>>> powerful
>>>>> IDEs, you can refactor without fearing too much regression, and
>>>>> that's a
>>>>> very important advantage, especially in a heavily OO language.
>>>>
>>>> That's no longer the case if you take a look at newer C/C++ IDE's like
>>>> the latest versions of XCode that uses Clang to handle basically all
>>>> language related features of the IDE, autocompletion, syntax
>>>> highlighting, refactoring and similar.
>>>
>>> So we want a flexible compiler front end for D written in D as well,
>>> right ?
>>
>> Exactly, one that can be used as a library.
>>
>
> What would be the interface to such a library?

That would take some thought if one would develop a library like that, 
it would also take some time and space to explain here. Preferably there 
would be API's to interact with the library for all phases of the 
compilation:

* Lexing
* Parsing
* Semantic analyzing
* AST traversing
* Both machine dependent and independent optimization
* Code generation
* Linking

These API's could be low level API's. Then there could be higher level 
API's built on top of the low level API's for specific tasks, like 
autocompletion, syntax highlighting, refactoring and so on.

An alternative would be to just use the same API as Clang does. Clang 
also has two levels of API's. The unstable low level API's is the C++ 
code, on top of that is the stable C API built for more specific tasks 
like autocompletion, syntax highlighting and refactoring.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list