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."
|