Luke Hoban: Orcas - Compiling LINQ, C# Futures, Intellisense
- Posted: May 17, 2007 at 6:25 PM
- 25,316 Views
- 12 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- Mid Quality WMV (Lo-band, Mobile)
- WMV (WMV Video)
Meet Luke Hoban, Program Manager on the C# Compiler team. Here, we talk about how LINQ works, from a compiler point of view. As you know by now, LINQ is a construct that is built of new language level innovations which of course must have compiler support...
As you might imagine, given the nature of LINQ's requisite language level components, we talk about functional programming and it's new role in our good old imperative world. In Orcas, you shouldn't talk about LINQ without showing it in action inside of Visual
Studio.
Enjoy.
For the detail-oriented folks out there: I shot this interview a few months ago, so you'll hear references to the Feb/March CTP. Have no fear, Niners, the content in this interview is as pertinent now as it was then (even more so with the release of Orcas beta 1).
Enjoy.
For the detail-oriented folks out there: I shot this interview a few months ago, so you'll hear references to the Feb/March CTP. Have no fear, Niners, the content in this interview is as pertinent now as it was then (even more so with the release of Orcas beta 1).
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.
Follow the Discussion
At the begining of the program, you mentioned "February CTP". Did I hear you right? If so, is this old video? I have not gone through the whole video yet.
Thanks.
Raghu/..
Raghu/..
I love the "simplicity" of LINQ and now I think it's even simpler after listening to Luke's explanations.
Would be nice if you could make a video where it's showed how to make a simple LINQ-to-X interface, since, I think, that where the real power of LINQ is unleashed
- Dan
Damn! I want to get the internship next summer! I want to work and chat with you guys...
Great video, Charles - although you could have dug a little bit deeper - but it's hard when you see something for the first time.
If anybody know, I would be very thankful if someone could explain me speed implications of the LINQ.
I've watche the video and it seems LINQ uses a lot of lambda functions, which I suspect are stack based. So are the linq expressions as fast as normal hand coded loops or they abuse stack and are thus slow. Can JIT compiler/Linq somehow inline those lambda functions to avoid suffering from stack over-use?
Or in other words, can I use linq for some serious math computations as a replacement for 'while' and 'for' statement?
Thanks for any answers.
Apart from that, LINQ over in-memory structures is written against interfaces (if I'm not mistaken) and therefor uses virtual calls all over the place.
And yes, the lambda expressions are called via delegates.
Hmmm. The .Where, .Group, .Sort, ... methods are defined in static classes (the in memory that come with .NET 3.5 - Enumerable is the static class name) and therefore in static methods. I think they can be inlined without any problems (They are also not that long, because they return only an IQueryable instance). The lambda expressions itself are very short and good candidates for inlining.
I wonder if somebody from the team could jump into this discussion and bring some light to it.
Just my 3.14 cents.
-Bart
I'd say lambda expressions have two major benefits over anonymous methods. First, they are syntactically more concise. Since the functions defined by lambdas or anonymous methods are most often needed in-line as part of a larger expression - it's important to have a good concise syntax. Otherwise, the code quickly becomes very difficult to read. So a major goal for lambdas was to provide a really concise and readable way to declare these small functions in-line.
The other benefit is the type inference you mention. This also helps with conciseness - but more importantly it avoids littering the type names all over a single simple expression, which can become a significant syntactic issue for many uses of lambdas.
At a higher level - the emphasis on lambdas is actually much more general than LINQ. We see many new APIs looking to provide the kind of level of abstraction that really requires taking delegates as arguments - and LINQ is just one example. I definitely expect to see more of these APIs in other interesting domains over the coming months/years.
Remove this comment
Remove this thread
close