Hacker News new | ask | show | jobs
by protomyth 5069 days ago
If I ever develop a program language, the first action I will take is the clang approach and make it a library based architecture. That way, people can build tools for the language including IDE integration without having to reinvent the wheel.
3 comments

Yes, this has been invaluable for us in Rust. One cool thing we've been able to do with this architecture is to write a fuzzer -- a tool that uses the Rust compiler itself to generate random Rust programs to test the compiler's correctness.
I think GHC does something like that. At the very least, it exposes an API that lets you do all sorts of fun things. There are projects like Scion[1] that let you integrate that into an editor.

[1]: https://github.com/nominolo/scion/

However, there is simply less drive to develop tooling like that for Haskell than there is for Java. Haskell is a much easier language to use given just a moderately intelligent text editor and a REPL than most others. Java, on the other hand, it verbose and annoying even with a very good IDE.

So Haskell can have good support, but since it isn't terribly necessary it isn't anything like a top priority.

Indeed, “the architecture of GHC” mentions some uses of GHC as a library: http://www.aosabook.org/en/ghc.html
Compiler As A Service. Microsoft are pushing this with Roslyn.

http://www.infoworld.com/d/application-development/microsoft...