Condividi tramite


Roslyn CTP Released

I’ve wrote quite a few blog posts about Anders Hejlsberg (i.e. Visual Studio Asynchronous Programming, Visual Studio 11) and deserving so as he’s one of those people that once you meet him you soon realize just how much knowledge he has to offer. You also quickly comprehend just how little you know in the grand scheme of things when it comes to software development. This is precisely why he’s a Technical Fellow here at Microsoft and has numerous projects underway. The one that’s of keen interest to quite a few people (and yours truly included) is a project that goes by the name of Roslyn (named after an old mining town located in Washington). If you’re not familiar with this technology it can best be described as a “compiler as a service.” Here's a good overview of the components:

With adding just a few references you’ll be surprised at the types of things you can do using this technology.

using Roslyn.Compilers;

using Roslyn.Compilers.Common;

using Roslyn.Compilers.CSharp;

using Roslyn.Compilers.VisualBasic;

Compiling and running code dynamically brings many concepts into reality but the one that I find most practical is the ability to convert C# to VB and visa versa. This is made possible as Roslyn exposes both object models and syntax trees of these languages.

I strongly encourage you to download this CTP and start experimenting with it as I’m in process of doing this myself. More information about Roslyn can be found on the Visual Studio Blog as well as the Download Center via MSDN to get the bits and accompanying documentation (e.g. walkthroughs, sample code, etc.).

Comments

  • Anonymous
    November 02, 2011
    Visual Studio guys can use this to bring lambda to immediate window in debug mode ;)
  • Anonymous
    November 05, 2011
    Perhaps this could automatically translate the code examples in VS Documentation (I always struggle to convert all the C# examples to C++/CLI).