what is the state of the "C# compiler as a service " [closed]
Asked Answered
L

5

24

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?

Lippizaner answered 5/2, 2010 at 21:55 Comment(4)
Anders was talking about the future (i.e. after C# 4.0).Grimbald
This is targeted for C# version 5, 4 isn't even RTM yet.Forewent
At the Time (PDC 2008) c# 3.0 was still in Beta and 4.0 was future... the talk also was about dynamic features, etcLippizaner
That feature is talked about after all C# 4.0 features at the end of the talk to clarify the future vision after C# 4.0.Grimbald
C
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.

Chiasmus answered 5/2, 2010 at 22:21 Comment(7)
@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 ;-)Lippizaner
This is certainly the most upvoted "I'm not gonna talk about it" answer on SO! ;)Grimbald
@Tim: I might or might not be in a meeting about it right now.Chiasmus
just read your new blog post re project Roslyn, to say I am excited about this is a vast understement. blogs.msdn.com/b/ericlippert/archive/2010/12/16/…Lippizaner
downloading as I write this :-) Thanks Eric.Lippizaner
@Eric: Can this question be resolved with Roslyn?Dewdrop
@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.Chiasmus
P
10

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

Proficient answered 5/2, 2010 at 22:10 Comment(4)
Are you sure? I know about the REPL thing but this one is available too?Grimbald
The Mono C# Shell is based on such a compiler service, tirania.org/blog/archive/2008/Sep-08.html tirania.org/blog/archive/2008/Sep-10.html mono-project.com/CSharp_CompilerBrahma
@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.Courier
I just cannot forget the two sessions on PDC2008. Anders, channel9.msdn.com/pdc2008/TL16 and Miguel, channel9.msdn.com/pdc2008/PC54. Yes, see them in this order and you will understand why Miguel's session is so funny. :)Brahma
E
4

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

Emileeemili answered 19/10, 2011 at 20:49 Comment(0)
V
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.

Varia answered 19/10, 2011 at 22:0 Comment(0)
C
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.

Chatoyant answered 5/2, 2010 at 21:57 Comment(4)
I think it means 100% in memory compilation IE: string -> assembly.Charnel
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.Hohenstaufen
@Earwicker: I believe that's the case. It would relieve half of my pain in writing a static analysis tool.Grimbald
@Daniel: Can be this done with Roslyn?Dewdrop

© 2022 - 2024 — McMap. All rights reserved.