“Microsoft, which has been pursuing concurrent improvements for its Visual Basic and C# programming languages, plans to open up compilers for the languages and add capabilities for asynchronous programming and immutability. Discussed at the Microsoft Professional Developers Conference in Los Angeles, the blueprint for the two languages will feature compilers as services and accommodations for multicore processors, said Luca Bolognese, program manager for the languages group at Microsoft.”
Is not clear to me what do they mean with “Open up” compilers.
Edited 2009-11-19 15:32 UTC
Some clarification would be nice..
With the opening of the compilers, Microsoft will move away from a “black box” mode and let developers see what is going on inside
The lack of a “let developers touch…” phrase is notable. I’m going to guess that this will be “open” for suitably constrictive definitions of “open”.
Yeah,most likely.
Looking is better than being blind. I have had problems with open source projects, and been able to find the problem within 8 hours of downloading the source. Which allows for quick fixes and/or work arounds.
What it means is that they’ve rewritten the C#-compiler in C# and the VB-compiler in VB, as .NET libraries, which you’ll be able to use in your own application. You’ll get access to the parsed AST for analysis (and probably also modification).
The compiler services are already part of the .Net core libraries. You can already compile assemblies and executables on the fly – I have even done this to implement a sandboxed scripting service for a product we have. All of the ASP.Net stuff uses the compilers in this way if you do not pre-compile them.
Sure, you can compile source code to .NET assemblies, but that just calls the native compiler (source file(s) -> assembly file). The new compiler-as-a-service gives you access to the AST in memory. You’ll be able to use the official parser for C#/VB instead of writing your own, if you need to analyze source code (or modify the AST before compiling it down to MSIL).
Well, that is just semantics… the Compiler Services are not “an executable” and you don’t “just call the native compiler” per se.
For most users of .Net, this doesn’t really give an awful lot that wasn’t available before – unless it packages it up more pleasantly. I don’t need to write a compiler – it already exists. However, I do need to compile code on the fly – and I’ve been able to do that since .Net 2.0 using the compiler services. I happily compile code my users write to complete simple computation rules and cache the rules assembly when needed (or sometimes it just sits in memory and never hits the hard drive directly.)
Is not really what I spected.