Microsoft now using next-gen Roslyn C#, Visual Basic compilers in house
'Highly usable' public preview could arrive next year
After more than a year of silence on the subject, Microsoft's Managed Languages team is once again talking about Roslyn, the radically redesigned version of its C# and Visual Basic compilers.
We first heard about Roslyn – described as Redmond's "compiler as a service" project – way back at the Build developer conference in 2011, but things have been pretty quiet since then. The last public preview of the technology was released in September 2012.
But in a blog post on Monday, Microsoft manager Matt Gertz said that not only has work on Roslyn been progressing, but the new compilers are now in a mature enough state that Microsoft has begun using them internally for some of its own projects.
"Specifically, I'm pleased to announce that everyone in the Visual Studio organization is using Roslyn in their daily work now," Gertz wrote. "In fact, the daily builds of VS are now compiled using Roslyn, all as part of a process that we refer to in the biz as 'dogfooding.'"
What makes the Roslyn compilers different is that they have been completely rewritten in managed Visual Basic and C# – unlike earlier versions, which were written in C++.
That allows the compilers to act as services for consumption by other software written in C# or Visual Basic. Every part of the compilation process can be used by outside programs for such tasks as code syntax parsing, binding, and even outputting .Net intermediate language (IL) on the fly.
Visual Studio itself is expected to be one of the first beneficiaries of this technology. Instead of having its own syntax parsing component, future versions of the IDE will be able to do syntax coloring, code hinting, code completion, and other parser functions using those featuresof the actual C# and Visual Basic compilers.
But third-party software will be able to take advantage of Roslyn, too. For example, using the Roslyn tools, a developer could create a quick and dirty read-eval-print-loop (REPL) console for interactively experimenting with C# code simply by writing a loop that accepts user input, passes it on to the Roslyn compiler, then executes the generated code. This type of dynamic compilation has a wide range of other applications, also.
But although Gertz said the code for the Roslyn compilers "is in a really nice state these days" and they are "highly usable for daily work," he cautioned not to hold your breath for a production version of the tools.
"'Dogfooding' is a prelude to being done, but there's still a bit of polish to put on before the new code is truly complete," Gertz said. On the plus side, however, he added that Microsoft is now "actively working through the details on starting up regular previews again," and that a new public release may be coming soon.
Gertz wouldn't say exactly when that might be, but if we had to hazard a guess, we'd imagine it might be around the time of Redmond's next Build conference, which is scheduled to take place in San Francisco from April 2 through 4. ®
Sponsored: Network DDoS protection