3 ms·
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 t
by protomyth 14y 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.
- pcwalton 14y agoYes, 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.
- tikhonj 14y agoI 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/ 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.
- obtu 14y agoIndeed, “the architecture of GHC” mentions some uses of GHC as a library: http://www.aosabook.org/en/ghc.html http://www.aosabook.org/en/ghc.html
- vdm 14y agoCompiler As A Service. Microsoft are pushing this with Roslyn. http://www.infoworld.com/d/application-development/microsofts-roslyn-reinventing-the-compiler-we-know-it-176671 http://www.infoworld.com/d/application-development/microsoft...