Friday, September 07, 2007

Hibachi, a lesson in diversity

I've always been interested in Ada. Unfortunately, I've never had the opportunity to work on a project that required me to use it. But from studying it over the years, I can immediately appreciate it's strong type system, inherent support for multi-tasking, and focus on helping the programmer write quality systems. I can think of many projects that would benefit from Ada, especially in the safety critical embedded systems arena.

As part of my vision for the CDT (or dream, I guess) has always been to support multiple programming languages and Ada was one I wanted to see. But with a lot of ideas I have for the CDT, I neither had the time or real community support for it. So when Tom Grosman from Aonix approached me proposing they contribute their ADT code to Eclipse, I jumped at the chance to help.

And I'm glad I did. The Hibachi project is the result of Tom's work and is nearing it's creation review. I have been trilled at how Tom had gone about talking to his competitors and other vendors and interested parties and built up a strong community, even before it got started. They have a firm plan that immediately focuses on meeting objectives that would enable all vendors to get value out of Hibachi. This will then promote additional contributions to make Hibachi the best Ada IDE in the business. I can't wait to see them in action.

There are a lot of things at play here that is a trend I've seen with successful Eclipse projects. In many ways the forces are there to make it happen. Customers are demanding high quality IDEs based on Eclipse, the free community would love to see Eclipse support for their favorite tools, vendors would love to provide it all but to do a good job of it, they really need to work together and share the burden. If you can harness all this energy and make your project a friendly place to participate, then I think you have the clear formula for success.

6 comments:

  1. Why is CDT the base for further languages and not Eclipse directly?

    Somehow the Language support seems to be tricky - at least my trials with Phortran were
    dissapointing as I could not
    update my CDT for C++ :(

    ReplyDelete
  2. The CDT provides a couple of pieces that the Eclipse platform does not. Most of them have to deal with integrating external build and debugging tools.

    As well, we've designed our source code index so that you can plug in different parsers to support different languages. Theoretically, if you write a parser for your language and implement the right AST interfaces, you can get features like content assist and open declaration for free. There is no such functionality in the Eclipse Platform.

    BTW, CDT is part of Eclipse ;)

    ReplyDelete
  3. I've been working on multi-language in CDT for a while now and I have to say I don't feel that CDT is, or should be, a truly multi-language platform.

    I was successful at adding support for the UPC language to CDT only because it is a very conservative extension to C99, which is a language that CDT already fully supports. If you had a "C like" language that actually differed from C/C++ in significant ways, such as C# or D, I don't think you would get much functionality for free.

    The UPC success shows that CDT already supports simple extensions to C and C++, for example UPC or Aspect-C or compiler specific C/C++ extensions. I think CDT is extensible only as long as it is possible to reduce new language constructs to existing ones. For example by treating a UPC forall loop as a C for loop, or by pretending an advice function in Aspect-C is just a regular C function. However, if you have some language constructs that just can't be made to conform to existing AST interfaces, or if the language differs in a significant way (such as forward references in C#) then you would probably be forced to implement a parallel version of the CDT core.

    It is my opinion that limited language extensibility in CDT is fine, however, CDT should focus on being the best C/C++ IDE in the world, instead of providing mediocre support for a variety of "C like" languages.

    ReplyDelete
  4. A lot of people would consider C# to be C-like.

    Anyway, the theory goes that if you implement IASTName and IBinding and probably a few more to plug things in, then you can totally gut the rest of the AST and replace it with something else. The CDT core features should only be referencing those interfaces to do their work.

    That is the theory. In practice, we are doing that with C and C++ which share almost no implementation classes. I'd love someone to take a shot at C#, but I don't expect it to be someone from the CDT who, as you mention, should be focused on making the CDT the best C/C++ IDE.

    ReplyDelete
  5. So is Aonix's ADT being opensourced? Has this already happened? This can only be good for Ada.

    ReplyDelete
  6. Yes, it's on its way. The creation review is next week.

    And I think this will raise the profile of Ada as a valid alternative.

    ReplyDelete