Microsoft Roslyn: Reinventing the Compiler As We Know It
snydeq writes "Fatal Exception's Neil McAllister sees Microsoft's Project Roslyn potentially reinventing how we view compilers and compiled languages. 'Roslyn is a complete reengineering of Microsoft's .NET compiler toolchain in a new way, such that each phase of the code compilation process is exposed as a service that can be consumed by other applications,' McAllister writes. 'The most obvious advantage of this kind of "deconstructed" compiler is that it allows the entire compile-execute process to be invoked from within .NET applications. With the Roslyn technology, C# may still be a compiled language, but it effectively gains all the flexibility and expressiveness that dynamic languages such as Python and Ruby have to offer.'"
It seems that Neil McAllister has never heard of LLVM and Clang, while Microsoft obviously has.
Roslyn is a complete reengineering of Microsoft's .NET compiler toolchain in a new way, such that each phase of the code compilation process is exposed as a service that can be consumed by other applications,
Sounds like LLVM.
Compile and execute code from within an application? That's exactly what Krita (http://www.krita.org) does with OpenGTL (http://opengtl.org) -- we have code written in special languages for filters and so on which gets compiled by Krita and then executed as native code. It's pretty safe as well.
This isn't exactly new. LISP had it from the early days. It's an idea that's been tried before, now available with more modern buzzwords, like "the compiler as a service".
LLVM is a better example. It's a set of libraries for generating a code in an intermediate representation, transforming that representation (usually for optimisation, but also for instrumentation and other things) and then emitting it as object code, assembly, or JIT'd executable code in memory. I've written compilers for Smalltalk and for a toy JavaScript-like language using it, and they share the same set of optimisations that I wrote for Objective-C and the same object model. The total amount of Smalltalk-specific code is about 15KLoC (including comments).
I am TheRaven on Soylent News