Posted By: Charles | Mar 3rd @ 12:16 PM | 64,202 Views | 50 Comments
It's always a pleasure to get a chance to sit down and geek out with Anders Hejlsberg. Anders is a Microsoft Technical Fellow (a Technical Fellow is the highest ranking technical position at Microsoft) and programming language design master. He's the creator of C# and one of the founders of .NET. Anders is an expert language design craftsman. C# is one of the most popular languages Microsoft has created and certainly the most widely used language by developers who target the .NET platform.

Erik Meijer, Expert to Expert host, programming language designer and occasionally-radical category theoritician, has spent many years working with Anders and the C# team. As you may know, Erik has been a key contributor to the addition of functional constructs to C#. 

Here, Erik and Anders wax on topics ranging from the design of C# 4.0's dynamic keyword (what's the thinking behind the thinking) to the potential near and far future of the C# language (and general purpose imperative programming, generally). Anders also spends some time at the whiteboard explaining C# 4.0's support for covariance and contravariance. Of course, we can't forget about concurrency and parallelism, so we don't.

As you might expect, the conversation takes some interesting jaunts into various programming language design rabbit holes. For example, Anders discusses the notion of creating a new language to support new problem domains versus extending current languages to meet the needs of developers who need to express solutions to complex problems (so, how do you make a language like C# more dynamic in the sense that it can readily help developers solve problems that the language was not initially designed to solve?). We talk about the work being done on a service-oriented C# compiler (compiler as a service), C# as an ESDL container (or as an EDSL itself to be hosted in other environments...) and much more. This is a fantastic conversation with some of Microsoft's true visionaries. Enjoy.
Rating:
15
0
Hot damn. An E2E video with Anders and Erik, that's my evening viewing sorted. Thanks Charles!
littleguru
littleguru
<3 Seattle

Awesome! Thanks guys. Great, great stuff... please more!

aL_
aL_
Rx ftw
as .tom said, expert to expert with anders and eric :O talking about crossing the beams (of awsomeness that is) cant wait to watch it Smiley

--edit--
what where you talking about there in the beginning btw? Smiley

--edit2--
hah first i was like, "wow.. i thoguht anders had more cubes that that" but then i saw that the row of cubes goes around the whole window Tongue Out (i still think he has a garage full of em at home though Wink )
aL_
aL_
Rx ftw
hehe i knew it Wink
its kind of interesting though, because eric is a static typing guy (that the impression i have anyway) but there are a lot of "dynamic" concepts in 4.0, most notably the dynamic keywork of course Smiley how does eric feel about that? is c# becoming "dirtier", less pretty? my personal awnser is "no, its awsome" but i wonder what erics awnser would be Smiley maybe its coming though, im only at 26:21 right now..
perhaps you could have an E2E with just eric (eric talking to eric) and talk about stuff like that Big Smile

what i really wanted to comment on was extension methods (talked about at ~25:00), what i really really like about them is that you can call methods on objects that are null and also you can add methods to enums.. small things yes, but darn useful Smiley

--edit @01:00:00--
what i meant when i said "just use haskell" was really, "just use haskell where its really convenient to do so and use c# when thats more convenient" Smiley that perhaps more interop is the key Smiley i do agree with eric though, maybe the divide between imperative and functional isnt that huge.. or maybe it doesnt have to be atleast Smiley thank you charels for bringing this topic into this conversation

--edit post watch--
wow man.. this i gotta say takes the channel9 crown from the discussion about c# (3.0 at the time) as the best c9 interview ever. i am slightly biased though because i kind of, sort of contributed indirectly but still Smiley
The discussion about functional vs imperative was really great though i dont think that battle will end anytime soon Tongue Out

the single greatest thing though is the complete lack of religion in this discussion, just pragamatism and pros and cons of diffrent concepts.. just that single aspect is something we can all learn from i think Smiley

again, great stuff Smiley

A few things I would like to see in C#:

  • With regards to immutability, how about a freeze method, like in Ruby and implemented perhaps as an extension method of System.Object, that would allow you to make an existing instance of an object immutable? (Also a IsFrozen() method to determine if an object has been frozen) It already exists in a limited form with readonly, and it might be doable moreso now thanks to code contracts that could be used to enforce immutability at compile-time and run-time.
  • Better literals for arrays, hash tables, and objects. Object and collection initializers are nice but not as succinct as in, say, Ruby or JavaScript.
  • (Really a wish for LINQ) Enumerable.Empty, i.e., return an empty sequence. Silly to ask for something so trivial but it's missing! And of course it needs a nice literal...

Long term for .NET:

  • SIMD instructions to support data parallelism in xPU computation where perhaps PLINQ code gets farmed out to the many processing units in your GPGPU (Cell, Larrabee) instead of the handful of processors in your CPU. This is something the Mono guys are already working on, if I understand correctly.
  • More lazily evaluated library methods (where possible and enabled by the underlying Win32 API), e.g., DirectoryInfo.GetFiles() takes a awfully long time to load when you have 500,000 files in a folder -- where's the wrapper for FindNextFile?  Or how about lazily evaluated networking functions where implementing a TCP server is as simple as implementing an iterator?
Maddus Mattus
Maddus Mattus
Do, or do not. There is no try. - Yoda
Nice shirt Erik!
Microsoft Communities