25

Back at the PDC in 2008, in the C# futures talk by Anders Hejlsberg he talked about rewriting the C# compiler and providing a "compiler as a service" I certainly got the impression at the time that they were targeting the C# 4.0 timeframe for this....

Well, does anyone know what the state of this is? it doesn't seem to be there in the CTP and there is almost no information on the WEB apart from links to the 2008 PDC session video (roughly an hour in).

Has this initiative gone dark?

abatishchev
  • 92,232
  • 78
  • 284
  • 421
Tim Jarvis
  • 17,081
  • 9
  • 52
  • 91

5 Answers5

38

Certainly not C# 4.0. We are just finishing up the last few bug fixes for C# 4.0.

This direction for the toolset is the long term plan, and might never come to fruition. And I don't discuss schedules for unannounced, hypothetical future features.

UPDATE: October 2011

We have just shipped a preview release of "compiler as a service" aka the "Roslyn" project.

We are still not announcing the final ship vehicle; it will be post Visual Studio 11.

Glorfindel
  • 19,729
  • 13
  • 67
  • 91
Eric Lippert
  • 612,321
  • 166
  • 1,175
  • 2,033
  • 4
    @Eric, thanks for taking the time to answer this personally. I really hope it does come to fruition, it opens up a whole raft of interesting feutures that we can add to our apps. and frankly, its just cool! I totally get and respect your position on not discussing schedules....there be dragons there...when you do that. But it would be nice to know if its still in the cooker...no other details required ;-) – Tim Jarvis Feb 05 '10 at 22:36
  • This is certainly the most upvoted "I'm not gonna talk about it" answer on SO! ;) – mmx Feb 05 '10 at 22:50
  • 14
    @Tim: I might *or might not* be in a meeting about it right now. – Eric Lippert Feb 05 '10 at 22:53
  • just read your new blog post re project Roslyn, to say I am excited about this is a vast understement. http://blogs.msdn.com/b/ericlippert/archive/2010/12/16/hiring-for-roslyn.aspx – Tim Jarvis Dec 16 '10 at 21:23
  • downloading as I write this :-) Thanks Eric. – Tim Jarvis Oct 20 '11 at 06:00
  • @Eric: Can [this question](http://stackoverflow.com/questions/2606322/how-to-check-if-string-is-a-namespace) be resolved with Roslyn? – abatishchev Oct 21 '11 at 14:17
  • @abatishchev: There is an API that lets you ask "what symbol is associated with this syntax"; if you hand it the name of a namespace then a namespace symbol will come back. – Eric Lippert Oct 21 '11 at 15:27
10

It's already available in Mono for quite some time.

Ray
  • 169,974
  • 95
  • 213
  • 200
Jörg W Mittag
  • 337,159
  • 71
  • 413
  • 614
  • Are you sure? I know about the REPL thing but this one is available too? – mmx Feb 05 '10 at 22:17
  • 1
    The Mono C# Shell is based on such a compiler service, http://tirania.org/blog/archive/2008/Sep-08.html http://tirania.org/blog/archive/2008/Sep-10.html http://www.mono-project.com/CSharp_Compiler – Lex Li Feb 06 '10 at 02:59
  • 5
    @Lex is right: actually, the C# REPL is really just a demo for the Compiler-as-a-Service feature in Mono. The REPL is Miguel's tongue-in-cheek response to Anders Hejlsberg's talk, in which he mentioned the possibility of a REPL for some future post-4.0 version of C#. Miguel wanted to demonstrate that you can write a REPL in Mono *right now* in less lines of C# than Anders wrote lines of English about it in his slides and less time than Anders talked about it. – Jörg W Mittag Feb 06 '10 at 06:53
  • 3
    I just cannot forget the two sessions on PDC2008. Anders, http://channel9.msdn.com/pdc2008/TL16/ and Miguel, http://channel9.msdn.com/pdc2008/PC54/. Yes, see them in this order and you will understand why Miguel's session is so funny. :) – Lex Li Feb 06 '10 at 07:36
4

It has been released CTP version in the name of Roslyn. You can check it at RosLyn

kernelman
  • 33
  • 2
  • 15
4

As of today (19 October 2011), there is a CTP of Roslyn available for download at http://msdn.microsoft.com/en-us/roslyn.

The CTP installs on top of Visual Studio 2010 SP1.

Kevin Pilch
  • 11,179
  • 1
  • 36
  • 39
2

I'm pretty sure I heard rumours of this being a "between 4.0 and 5.0" item now (a separate library, like ASP.NET MVC)... but I can't remember where I heard that. I certainly wouldn't expect it in 4.0 at this point. Frankly I don't even really know what the phrase means exactly - it could cover a whole range of features.

Jon Skeet
  • 1,261,211
  • 792
  • 8,724
  • 8,929
  • I think it means 100% in memory compilation IE: `string -> assembly`. – ChaosPandion Feb 05 '10 at 21:59
  • 3
    I hope it means `string` -> `expression tree` -> to your-choice, expression trees as a lingua franca for conversion between strings, executable methods and types, assemblies and so on, perhaps even an extensible compiler pipeline allowing custom language extensions, DSLs, etc. Well, I can dream. – Daniel Earwicker Feb 05 '10 at 22:05
  • @Earwicker: I believe that's the case. It would relieve half of my pain in writing a static analysis tool. – mmx Feb 05 '10 at 22:07
  • @Daniel: Can be this done with Roslyn? – abatishchev Oct 21 '11 at 23:31