Luke Hoban: Orcas - Compiling LINQ, C# Futures, Intellisense
- Posted: May 17, 2007 at 6:25 PM
- 25,830 Views
- 12 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
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
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
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