Editor’s note: Welcome to .NETRocks Conversations, excerpts of conversations from the .NET Rocks! weekly Internet audio talk show. Hosts Richard Campbell and Carl Franklin chat with a wide variety of .NET developer experts. This month's excerpt is from show 541, "Anders Hejlsberg blows our minds!"
Carl Franklin: I'm very, very excited to introduce Anders Hejlsberg to .NET Rocks! Anders is a Technical Fellow in the Developer division. He is an influential creator of development tools and programming languages. He is also the chief designer of the C# programming language and a key participant in the development of the Microsoft .NET framework. Welcome to .NET Rocks!, Anders.
Anders Hejlsberg: Thank you.
Franklin: Well, there's so much to talk about. I don't know really where to begin. Let me just ask you what you're doing these days first of all, and then maybe we can take it from there.
Hejlsberg: Day-to-day I still work as the chief architect of C#. We are just, this coming week here, shipping Visual Studio 2010, which includes C# 4.0, and that's something we've been working on for the last couple of years.
I also get involved in doing design, API design on the .NET Framework. I was deeply involved in the project to create LINQ, or Language Integrated Query, in C# 3.0 before that, and of course, that wasn't just a language thing. It was also in VB and also included an O/R Mapper and an XML API that I worked on. I sort of get to work on a bunch of different things. These days in addition here to C#, I also sort of oversee our, from a technical standpoint, our strategy for our managed programming languages—VB, and F#, and the IronPython, Ruby Dynamic Languages.
Franklin: What do you think about the language revolution as it's come about?
Hejlsberg: Well, I think the more the merrier, in a sense. New programming languages is how we move the state of the art forward, so I'm a big supporter of that. I think it's interesting to see how the way languages evolved has shifted over time and has changed over time because frameworks and IDEs have gotten so large that it is increasingly important to leverage what's already there. So we're seeing lots of new languages now being built on top of these big managed frameworks or platforms, be it Java or .NET, as opposed to being implemented in their own little world, and I think that's exciting. I mean, luckily we engineered .NET to be a multi-language platform, and that's certainly serving us well now.
Richard Campbell: I guess the question comes down to whether languages will actually get old living in a framework. With Delphi, with the competitors of Visual Basic, the old one, and it's kind of interesting that you're now working with VB, the new one as well, but we can see that Delphi is getting old and it's sort of have been left behind, although I think Embarcadero has announced that it's still out there, it just doesn't have the traction it used to. Is that even possible with .NET Framework, for languages to lose relevance?
Hejlsberg: Anything is possible, but COBOL is in many ways still relevant, and what has it been now, about 40 years, or is it 50? You know, it's yes, they will lose relevance eventually but, boy, it can take a good long time. You know, C++ is still very relevant. I think languages have evolved a lot slower than we all think sometimes and certainly a lot slower than the hardware evolution that we've seen over the past decades, so I think there are many good years left still in .NET and the languages on top.
Franklin: When I look at LINQ, I think it looks to most developers like magic. I mean, is it really simple, or is it incredibly complex, or is both? When I think about what you're doing behind there, I know you've got a parser for the language in a particular structure, and then are we just traversing big lists of lists of lists? Is that really all we're doing? What's going on in there?
Hejlsberg: What's going on in there? Yes, yes. Well, so LINQ is, I feel, a wonderful pragmatic application of functional programming, actually. I think also that to me one of the exciting aspects of LINQ is that if you boil it down to its constituent parts, it's just some language extensions and some API. You know, we added in C# 3.0 maybe five or six extensions to the language, including Lambda expressions, extension methods, anonymous types, type inference, and a few others. But taken together, these language features make it possible to construct a new kind of API that previously wasn't possible. And so one API that we've built out of those is this thing called LINQ, which really is just an API, an API that composes together to form a query language. And on top of that, we then have a thin syntactic veneer in C# itself, the thing that allows you to write SQL-like queries where you say from C in customers where blah, blah, blah, select blah, blah, blah, but really the compiler just boils it down to calls to methods named where and select and order bind, group bind, and so forth, and they're just implemented as API.