Lambda the Ultimate

inactiveTopic CLR Design Choices
started 2/4/2004; 12:00:05 AM - last post 2/10/2004; 5:44:49 PM
Ehud Lamm - CLR Design Choices  blueArrow
2/4/2004; 12:00:05 AM (reads: 9394, responses: 7)
CLR Design Choices
A new installment of Bill Venner's interview with Anders Hejlsberg.

Some of the issues mentioned are interesting from a language design point of view. Others are more implementation-oriented and concern the design of the VM and IL.

Posted to cross-language-runtimes by Ehud Lamm on 2/4/04; 12:01:46 AM

Chris - Re: CLR Design Choices  blueArrow
2/5/2004; 8:24:27 PM (reads: 189, responses: 0)
I thought it was interesting that CLR's design goal is to always JIT, never interpret. That seems like a huge win. I've never understood why Java the language always requires Java the VM. For an applet sandbox in a web browser, sure that makes sense. But Java's two big successes are server apps and J2ME. Both of these markets would benefit from a JIT compiler, not a slow interpreter!

Frank Atanassow - OO = untyped = good and other cynical remarks  blueArrow
2/10/2004; 11:30:18 AM (reads: 137, responses: 1)
Man, there are just so many things in these articles that had me seeing red. Here are just a few.

Evidence for my thesis that the word "OO" is a moving target that has become synonymous in most programmers' minds with the word "good".

Bill Venners: In addition to being a C# and CLR construct, the value type is a general object-oriented programming concept. Another such concept is immutable types.

Anything that `I' like is OO. Anything `I' do not like is not OO. More OO is better; pure OO is therefore the pinnacle of goodness.

(Here is another amusing article, by Norman Walsh: XML Is Not Object-Oriented. Gee, really? That sounds so contradictory, because: XML is good, and anything good is OO, therefore XML must be OO.)

Bruce Eckel also seems to be struggling with his notion that `dynamic typing = good'. Here's an exchange from part III:

[Hejlsberg:] Inner classes can help a bit with that housekeeping, but nonetheless, part of the problem with using interfaces is that the receiver of the event has to know that he is receiving the event. He has to explicitly implement the listener interface. With a delegate, by contrast, as long as the signatures are compatible, you can just slot them together. The guy handling the event doesn't care how he got called. It's just a method.

Bruce Eckel: It's sort of a weaker typing.

Anders Hejlsberg: Yeah, indeed it is. [Me: No, Anders, it's not.]

Bruce Eckel: So it's more flexible.

Ah yes, of course. Flexible = good, less typing = more flexible, delegate = good, therefore, delegates are weakly typed.

It continues:

Anders Hejlsberg: Yes, exactly. It's purely based on whether you have compatible signatures, i.e., parameter lists. If you do, you can wire them together. And it also conceptually completely matches the end user expectation of what happens with a call back, right? Give me some parameters and I'll write some code. Sure sounds like a method to me. Sorry, I'd like to give you a reference to that method, and that's what a delegate is.

Bruce Eckel: And yet in the end you don't lose the type checking. The type checking is happening at runtime?

Anders Hejlsberg: No, even more is happening at compile time.

Oops! That must have caused a bit of cognitive dissonance for Bruce there.

From VII:

Bruce Eckel: Will I be able to do a template function, in other words, a function where the argument is the unknown type? You are adding stronger type checking to the containers, but can I also get a kind of weaker typing as I can get with C++ templates? For example, will I be able to write a function that takes parameters A a and B b, and then in the code say, a + b? Can I say that I don't care what A and B so long as there's an operator+ for them, because that's kind of a weak typing.

See? `I want X; therefore X must be as untyped as possible, because otherwise X would be bad.' Of course, what Eckel is asking for actually has nothing to do with weak typing, dynamic typing, or anything like that.

Bruce Eckel: Well, yes, I started seeing C++ templates as sort of a weak typing mechanism. And when you start adding constraints on top of that, you're going from the weak typing to the strong typing. It always gets more complex when you add strong typing. It's a spectrum.

Anders Hejlsberg: The thing you realize about typing is that it's a dial. The higher you place the dial, the more painful the programmer's life becomes, but the safer it becomes too. But you can turn that dial too far in either direction.

Wow. How Christian. Let us purify ourselves with the holy flail of static typing in the name of Safety.

From part I:

Anders Hejlsberg: Ultimately, good language design boils down to assembling a team of people who have good taste. It boils down to programming aesthetics, as you are saying. Good taste is extremely subjective and hard to define, but you can sort of recognize it when you see it.

Question: Is Hejlsberg a scientist talking about a technical topic, or a New England socialite at a country club, taking his tea and crumpets? I guess I am out of a job if all you need to design programming languages is good taste. The implication here, of course, is that finding people with this indefinable, mystical quality of good taste is extremely difficult, so Microsoft was very lucky to hire Hejlsberg and his crack team of aesthetes. Otherwise, hell, anyone could have designed C#!

Oh, and please compare: "All you need to design [bridges, buildings, dams, nuclear reactors, missile guidance systems, medical equipment] is good taste."

Ehud Lamm - Re: OO = untyped = good and other cynical remarks  blueArrow
2/10/2004; 11:43:33 AM (reads: 132, responses: 0)
I agree with almost everything Frank wrote. Especially, about OO being a moving target (it's great to discover that generics are an OO concept :-) and about the misuse of the term "weakly typed".

It seems that even people that know what the terminology actually means like to make arguments-by-analogy (e.g., "it's like weak typing") which often result in absurd conclusions.

Isaac Gouy - Re: CLR Design Choices  blueArrow
2/10/2004; 12:05:54 PM (reads: 110, responses: 1)
After reading this artima stuff for months, I still haven't been able to figure out how much the interviewers misunderstand and how much they are deliberately dumbing-down for their readership. (Maybe I'm being too generous?)

OO being a moving target
Count your blessings! Think what it would be like if functional programming were popular ;-)

dumbing-down to the level of the interviewer?

Ehud Lamm - Re: CLR Design Choices  blueArrow
2/10/2004; 12:22:33 PM (reads: 108, responses: 0)
dumbing-down to the level of the interviewer?

Your guess is as good as mine. Let's just say that I am not one of the admirers of Bruce Eckel...

Patrick Logan - Re: CLR Design Choices  blueArrow
2/10/2004; 3:41:23 PM (reads: 100, responses: 0)
There are too many silly statements in this to comment about any one of them. Even though I am a "weak typing and OO" kind of guy... 8^)

...I have to go along with all of Frank's comments.

Think what it would be like if functional programming were popular ;-)

I'd like to be able to go to the Holodeck and find out.

Mark Evans - Re: CLR Design Choices  blueArrow
2/10/2004; 5:44:49 PM (reads: 92, responses: 0)

Frank your words are pure music because this episode seals your fate: Microsoft will never hire you away from us.

Incidentally there is no mystery about Microsoft staffing. Just search the web for "Microsoft interview questions."