C#: Yesterday, Today, and Tomorrow: An Interview with Anders Hejlsberg, Part 1by John Osborn
Anders Hejlsberg joined Microsoft in 1996, and did his initial work as an architect of Visual J++ and the Windows Foundation Classes (WFC). Hejlsberg is currently a Microsoft Distinguished Engineer and chief architect of the C# language, and he played a key role in the creation of the Microsoft .NET framework. Today, he leads the ongoing development of the C# programming language. John Osborn, executive editor with O'Reilly Media, Inc., responsible for the company's developer books on .NET and other Microsoft initiatives, recently sat down with Hejlsberg for this wide-ranging interview.
Osborn: I thought I'd start off by jumping back to the year 2000, which is the last time we talked. It was interesting [for me to reread] the interview. At the time, we [seem to have been] obsessed with Java, and there were comparisons being made between C# and Java.
Osborn: From the perspective of five years--looking back on that time, and looking at where C# is now--what is your sense of where the language is [today]? Is [C#] a Microsoft-only tool? [Or] is it something that has a broader place in the community?
Hejlsberg: Right. A lot has happened in those few years, and the world looked very different back then … certainly from a competitive standpoint. We didn't have .NET, and Java was a much newer, much more [in-]vogue thing at the time. So obviously there were a lot of comparisons being made. I think in those five years, C# has really grown up. Today we're talking about version 3.0, and we're just about to ship 2.0, and we shipped [versions] 1.0 and 1.1 [some time ago].
[When] we look at tracking studies, .NET appears to be at least neck and neck with Java now in terms of usage. And [there's] lots of C# [usage] there. So [C# is] a grown-up language now, as opposed to the newcomer. Obviously, I'm very happy with the fact that it's taken this position. There are obviously some big differences in the two platforms. I mean, .NET is first and foremost a Windows development platform. And that causes you to have [a] different business strategy. Now, that said, you know that we participated actively in [the] standardization of C# and the core pieces of the .NET framework. There's now actually a version 3.0 standard of C# [Ed.: ECMA-334 and ISO/IEC 23270].
It's a little confusing because what they call 3.0 is what we're calling 2.0, but ...
Osborn: I was going to ask you about that later.
Hejlsberg: That's a bit unfortunate numbering there, something we ought to get fixed somehow. But it's out there, and there are third-party independent implementations of C#. Mono certainly comes to mind. And so [ours is] not just a close-ended proprietary strategy.
I also think that Microsoft in the last five years has gone through a big transformation in terms of transparency and community involvement, openness and so forth. The kinds of dialogues we engage in with customers now are very, very different from what they were five years ago, and night and day from what they were ten years ago. You know, the whole industry, through blogging and open source and what have you, has very much switched around, and sort of the center of gravity lies much more with the individual developer and the individual person than it used to.
C# as a Component-Oriented Language
Osborn: [When you introduced the C# language in 2000], your number one bullet was that this was the first language that was really component-oriented. Has [your] perspective changed in five years?
Hejlsberg: Well, it's become more than that, for sure. But [C#] is still what you could characterize as a component-oriented language. And that takes us back to properties, methods, events, and the core things that you deal with on a day-to-day basis in your programming. Back then, and even more so now, programming very much is aided by tools, and those tools very much tend to have a programming model where you have some sort of design surface where you put components, and then you modify the components, put code behind them, set their properties.
I always felt that [properties and events and methods are] such important concepts that they deserve first-class treatment in the language, and that's what we did with C#. And quite honestly, I have heard no complaints about the fact that we have properties. It is a complete non-issue, you know what I mean? It's just, "Yep, yep," people just think that's completely natural.
And in a sense, this idea of giving first-class treatment to things that we commonly do is something that is very dear to my heart. In many ways, it's the same [thing] we're doing with LINQ and language-integrated query, right? It's giving first-class treatment to the notion of query in a programming language, because we all like queries. It's a declarative way of expressing something at a higher level than if you write a bunch of
for loops and
if statements and sort of do it the manual way.