Charles

The Roslyn Project - Meet the Design Team

Download this episode

Download Video

Description

What is Roslyn?

Traditionally, compilers are black boxes – source code goes in one end and object files or assemblies come out the other end. The Roslyn project changes that model by opening up the Visual Basic and C# compilers as APIs. These APIs allow tools and end-users to share in the wealth of information the compilers have about code.

The Roslyn CTP previews the "next generation of language object models for code generation, analysis, and refactoring, and the upcoming support for scripting and interactive use of VB and C#."

Here, we meet the Roslyn Project design team (and the authors of the The Roslyn Project technical paper), Anders Hejlsberg, Karen Ng, Matt Warren, and Peter Golde. We discuss why Roslyn matters, how it works (briefly - we'll go deeper in the future), what it affords, and what it doesn't enable. This is a very interesting project and Roslyn promises to make Visual Studio code refactoring tools easier to build and potentially more powerful than they are today, but at a deeper level—Roslyn provides programmable access to a world class compiler infrastructure - language parser, semantic analyzer,etc - to managed developers (C#/VB).

It's an open question as to what you may actually end up doing with Roslyn if you are not, say, a visual tools developer, but that's the point of this random interlude (aka a Charles interview...though we do talk extensively about what Roslyn can be used for). With Roslyn, you have a lot of power and information at your disposal. How are you going to use it? What will you build?

Download the CTP, play around with Roslyn and provide feedback to the team. They want to hear from you!

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • Jesper

      Awesome.

    • Heavens​Revenge

      It's terrible news to hear that F# is being used so little/not at all in Roslyn Sad

      C'mon Anders, sure C# is your baby but it sounds like you aren't leveraging F#'s amazing aspects for making a project like this. By just embracing some native F# a little more and merging their IL together would be a beauty. Then aspects of the TRUE next generation of code generators should show themselves via your team's findings.

      Who say's you can't create C#'s successor language instead of just dwelling on C# so much?

    • pm100

      And what about all the nice DLR based languages. I assume they were killed off (ie bounced from MSFT) because anders wanted people to use this project. THis misses the point of things like IronXXX, JINT etc. They are very lite and dont bloat the CLR with non-unloadable temporary code. THey are script environments - with all the dynamic typing support

      twas a sad day when that happened

    • Warren

      It's great news. Hopefully this project gets fully supported, I'm hugely in favour of this type of thing for refactoring/code generation/evals.

    • Richard.Hein

      Can't wait to watch this one. ...  Big Smile

    • davewill

      This will be great for learning another language while writing in the current language we are most familiar with.

    • shaggygi

      Once Roslyn RTMs, will the features be able to be deployed with an app ( e.g. WPF ) to another PC or is this meant to be used on a dev machine that has VS vNext? Meaning, if I wanted to include a script window ( like shown in demo @ Build ) to write C#/VB in a TextBox... could it be able to process the syntax and output the result? If so, does the machine the app is deployed to only need .NET 4.5 installed?

    • WinInsider

      I hope F# team will have free hand and resources to continue pioneer work in language features... and in turn we get benefit of their work in C#... kudos to C#, F# and VB.NET teams... .NET Power!  Platform for many programming languages, under one runtime.

    • felix9

      Hmmm ... her name should be Karen Ng according to
      http://research.microsoft.com/apps/video/default.aspx?id=152281

      Thanks for reassuring us about the performance of 'going managed' Smiley

    • Charles

      @felix9: That's true. That's her married name (a recent change). I'll fix.

      C

    • exoteric

      I wonder if Linqpad is going to go Roslyn now.

    • Kyrae

      Cool stuff.

      It would also be very nice if the persistent structures used in Roslyn were made available in the BCL. Would be very nice to have something like System.Collections.Persistent.PersistentDictionary<Key,Value>.

    • SteveRichter

      I am interested in hearing more about how the data structures Anders was describing work.

       

    • Jesper

      Rich Hickey, creator of the Clojure language and its runtime libraries, has a very interesting talk on completely concurrency-safe programming, which includes talking about persistent data structures: http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey

    • Jesper

      I would also like to see Microsoft release the ones that they have created, if only as sample code that doesn't carry any pressure to support it. Hopefully they will go open source along with the rest of Roslyn.

      The big problem with using them in practice may be that you have to wrap them in another object and swap the underlying "value object" for something like data binding to work. I guess the sample code in Roslyn which continuously inspects syntax trees might contain some hints to making this work.

    • LHalstrom

      Cool interview, thanks!

       

      But that was just what... what people on Channel9 have made comments about. Because, of course I... and, you know, other people have been talking a lot about C++ lately, and so we’ve used the language of power and performance they laughed... well they laughed and they sort of said, you know: well, looks like it's gonna be slower because it's managed code... whatever.

      Could you link where this happened?

    • jorgen

      There's an incredible amount of FUD floating around here.

    • Tomas_​Voracek

      Will Immediate window be replaced with Interactive? I miss LINQ query expressions evaluation. I know it is listed on Connect, but are there any plans for V11?

    • Chris

      Anders talks about Roslyn as a "new compiler" -> is this definately the case? I thought that Roslyn was basically a set of services wrapped around the existing C# / VB compiler.

    • AgnisM

      @Chris. C# and VB compilers will be bootstrapped. (rewritten in their corresponding language), plus expose the API's these compilers have.

    • terrajobst

      It would also be very nice if the persistent structures used in Roslyn were made available in the BCL. Would be very nice to have something like System.Collections.Persistent.PersistentDictionary<Key,Value>.

      @Kyrae: What do you mean by persistent data structures? Any chance you are referring to immutable collections? We actually entertain the idea of adding immutable collections in the next release of the .NET Framework (sorry, not this one). Of course, I cannot make any promises that we actually end up adding it but they certainly gain a lot more importance in this new async world.

    • terrajobst

      Anders talks about Roslyn as a "new compiler" -> is this definately the case? I thought that Roslyn was basically a set of services wrapped around the existing C# / VB compiler.

      Roslyn is both, a compiler and set of services on top. Have a look at the Roslyn technical paper. More specifical, section 2.2 API Layers.

    • Kyrae
      @terrajobst: Yes, that's what I am referring to (Anders used the term persistent in the interview so I used it as well). Good to hear it's comming. Altho, I found out F# already has an implementation of an immutable map so I think I will stick to that in the mean time.
    • Richard.Hein

      , terrajobst wrote

      *snip*

      @Kyrae: What do you mean by persistent data structures? Any chance you are referring to immutable collections? We actually entertain the idea of adding immutable collections in the next release of the .NET Framework (sorry, not this one). Of course, I cannot make any promises that we actually end up adding it but they certainly gain a lot more importance in this new async world.

      I thought the immutable collections were added because they were required to work with WinRT?

    • kinecty

      @LH: it didn't happen. charles is just getting desperate, because with the compiler going managed, he's losing another ground where he can bash C# and "amp" C++ :)

      http://channel9.msdn.com/Shows/Going+Deep/CLR-45-David-Broman-Inside-Re-JIT

    • shailendra trivedi

      Sir,
      Please help me. When we create a windows application and create setup.how we can attach database in our setup without connecting server.
      Please send solution in my mailid.
      Thanks

    • terrajobst

      Richard.Hein wrote

      I thought the immutable collections were added because they were required to work with WinRT?

      We added the read-only collections primarily for WinRT interop. Immutable and read-only collections are different in many ways. The most important one is that immutable collections give you the guarantee that they will never change. Read-only collections do not make this promise. Our ReadOnlyCollection<T> takes an IList<T>. Changes you make through the IList<T> can be observed via the ReadOnlyCollection<T> but you cannot make changes directly through ReadOnlyCollection<T>. The idea there is that you can use ROC<T> to expose collections that need to be kept in sync, for example Dictionary's Keys and Values. You cannot direcly change those collections, but once you add to the dictionary, both collections will reflect that change.

      If you want to learn more about the differences between immutable, read-only and frozen collections you should read this great blog post by Andrew Arnott.

    • tvizle

      Thank you for this amazing tidbit

    • ifycent

      Am so much happi and coded in vn.net..........if any 1 can also be putting me tru more and more am gonna apprecitate dat........

    • Jagdeesh

      Have u ever thought, are all these things neccessary...i don't thik so..

    • yaqmur

      awersome,extraordinary...follow all of the changes made...

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.