By Niels Ladegaard Beck | September 29, 2008
After an exciting keynote by Anders Hejlsberg, I got the opportunity to have a little talk with him. As you all probably know, Anders is working as a Technical Fellow at Microsoft (which should be a pretty nice and interesting job). Anders is the inventor of Pascal; has worked at Borland with Turbo Pascal and Delphi and afterwards he joined Microsoft where he worked on J++. Now his focus is on C#.
So Anders, what are you working on at the moment? I know it has something to do with C# 4.0 and from your keynote I also know some of the keywords: dynamic, concurrency and declarative. Can you tell me a bit more?
As part of my long involvement in C# I am always working on the next version – and that is C# 4.0 right now. Which we gonna publicly show for the first time at the PDC in a month in Los Angeles. And some of the stuff that is in there is this ability to dynamic program in C# through the Dynamic Language Runtime and there are some other language features that we are working on. Concurrent with that we are also starting to do work on even a future release of C# beyond that where we are trying to do a lot of the stuff I talked about turning the compiler into more of a service where it is much easier for you to leverage the language in the compiler in your application. If you have lightweight hosting scenarios, if you want an interactive prompt, if you want to make a domain specific language that have little islands of C# imbedded in it. We want to get our infrastructure to that level where you can just think of a compiler as an API you can call that will compile a piece of code for you given a certain environment and then give you back expression trees that you can then walk over and analyze and transform and then maybe make IL out of it and execute that IL or store it.
You presented a new keyword in your keynote, dynamic. With dynamic it will be possible to call methods on objects from ex. a dynamic language. Have you thought about making it possible to declare an interface for those objects, so IntelliSence and so on could help us C# people using these dynamic objects?
Right, so you could sort of duck type or fake up an interface implementation. Sure, that is another way of looking at it. Although it is sort of a higher barrier of entry, it has more of the static typing feel to it, but it is also more work up front – I just want to call this “add” function with these two arguments, I don’t want to be bothered by declaring an interface first and whatever, that is entirely the point of dynamic programming – you don’t have to do all these gestures before you get to do the real thing.
That’s true, but maybe the object we are dealing with are a little bigger than just a “add” function – it could be pretty big and I’m a C# guy, I want my IntelliSense to do the work for me.
At PDC, you will show C# 4.0, but when do we get something to play with?
It can’t tell you exactly when or whether we will have some at the PDC or thereafter, but as soon as we can give people stable bits.
Apart from C#, what is your favorite programming language? Is it Pascal or?!?
You know what, Pascal is actually pretty damn nice! It’s a nice simple little language. I always enjoyed using it. I think F# is fun; I’ve been playing around with it. I’m in a sense language agnostic; I like languages – that’s sort of the thing I like. I don’t like one particular language which I’m very religious about. Of course I love coding in C# and I do that a lot but the functional stuff is fun. It’s fun dealing with meta programming in these dynamic languages but at the core I’m still deeply a believer in the advantages of static typing. I think this notion that you just throw types away and the world is better – I don’t believe in that. There is just way too much goodness in static typing. The notion that you find your errors at compile time, you know instead of runtime, before the shuttle flies instead of while it’s flying – that’s a good thing! Statement completion is a good thing, refactoring etc. etc. There is too much good to just do away with it.
We’ve already seen a lot of stuff from F# coming to C#, will we see more of that?
We already have lambda expressions, some type inference and you know, we continue to think about like I mean “hey do we need tuples in C#, maybe pattern matching whatever” but it’s hard to retrofit that on a language that has sort of a different paradigm. Like if you look at functional programming and algebraic data types, you know, the ability to declare these typed records or variant records where you declare a list node as a leaf or a node and then you write code that pattern matches over the possible choices. That’s really in a sense just a different way of modeling something that you can also model as an object hierarchy and have virtual methods and making that distinction is a pretty advanced thing to do. So if a language has one or the other then the choice has already been made for you. If it has both, you have to be pretty darn advanced to really get which way you are supposed to do this. So we have to be a little careful that we don’t add too much conceptual baggage to the language. So that’s something we continue to think about.
So now you’ve been working on C# for about 8 years, before that it was J++ and even earlier on it as Pascal. What’s next?
Ha ha ha… who know what’s next? There are many versions of C# left and it’s still a young language. There’s lots of good stuff to do. I have no plans to abandon that one and do something else. As long as I’m having fun I’ll be doing this.
Will you ever come back to Denmark – we could use some more good people here at Trifork?
I enjoy coming to this conference and it’s technically one of the… very… high level conferences and of course I get to see my family here. So yes, I do come back every summer. But that’s mostly just for family. I’m happy at Microsoft. The thing I really enjoy about my work is knowing that it has broad impact; hundreds of thousands of people are using the work that you do. That’s always nice.
Okay, the last question: What presentation will you go see tomorrow?
Ha ha. I haven’t looked at the program for tomorrow. But, but… I can’t tell you2008 JAOO QCON | Tags: tuesday.today.jaoo.dk.featured | 1 Comment »