" ... types (static types, of course, there being no other kind) ... "
This is the statement I'm referring to above. It strikes me as completely misguided and wrong. Most languages that I know of, even most statically typed languages, know dynamic types. Java has instanceof. C++ has virtual dispatch (which is based on an objects dynamic type). Even C (untagged) unions usually have some (bit)field that allows the running program distinguish the type of data in the union.
I believe that in general, types are properties of data, which rarely exists at compile time. Thus, almost all types are dynamic. Statically typed languages simply restrict the data that can be stored in variables to a particular type and subtypes thereof.
In general I find Harper's "positive" opinions on the design of ML better than his "negative" opinions on why everything that isn't ML is doing it wrongwrongwrong, but he's definitely quite intelligent and usually has some good points.
Professor Harper typically spends two lectures in his undergraduate PL class developing the idea of dynamic typing, and then demolishing it. If you turn to the section on 'Static "Versus" Dynamic Typing' in his book (http://www.cs.cmu.edu/~rwh/plbook/book.pdf -- currently section 22.3, but subject to change), you'll find a summary of his argument. Basically, what dynamically-typed languages do is not really "type-checking" but "run-time tag checking."
You brought up a really good point though -- C and Java aren't really statically-typed languages. Getting a null-pointer error is just not possible in a type-safe language.
It's unsurprising Harper doesn't like that view, because he objects to the entire line of machine-oriented CS thinking, on both the engineering and the theory sides. For example, he thinks computational complexity theory should ditch Turing machines and be refounded on the basis of functional programming.
Dynamic languages are popular because you don't need to make decisions about types up-front, nor specify the types, nor change them when you change those decisions. In terms of the act of coding, it's more flexible when you begin, and more flexible when you maintain. He's right of course that static types are more flexible in terms of carving out a particular subset of the space of possible programs (as context free grammars are more flexible that regular expressions).
That is, some simple and well-known facts are unknown to him. I still think he has something interesting to say, it just takes some extra work to get to it, and you have to take it with a grain of salt because although he's supremely confident, he's coming from quite a limited perspective.
EDIT There's some hints in his conclusion and a comment that he does see real benefits to dynamic languages (without articulating them) - so perhaps he was just trolling or being ironic.
I was saying that, as a question of fact about the world today, one of the reasons that today's dynamic languages are popular is that you don't need to specify types (within the competitive set of mainstream statically typed languages). Not marketing.
---
But maybe I see where he's coming from now: he's saying that statically typed languages are a superset of dynamic languages. So, therefore, they should be more popular than dynamic languages. But they're not... so, thinks he, it must be for some other reason... like marketing.
This perspective would explain his attitude; but I deeply disagree with it. It's a mistake to expect popularity to measure technical quality. Sometimes they coincide, but not always. I don't agree with the common idea that "marketing" always causes the difference, as in promotion and advertising and advertising a technically inferior product leading to widespread adoption. I do think it is due to marketing, but not that kind. It's that the popularity of a product is due to how well it meets the needs of users, compared with the alternatives; it is not technical quality per se, but technical qualities that are needed.
Needs are often ranked, in that users won't worry much about their second need until their first need is met. And after their first need is fully met, they don't really appreciate getting even more of whatever met it. Like being thirsty - a glass of water is great, two, maybe even a litre... but increase the amount enough, and pretty soon, you're just not that excited about drinking all that water.
In other words, popularity is more about users than products - so it can be misleading to measure products by popularity.
To bring it back to the article: the lack of mainstream popularity of his favourite languages is less to do with static vs. dynamic typing, and more to do with the reasons why lisp is not popular (e.g. libraries, familiarity, community, toolchain, intutiveness, etc).
For example, abstraction is a great thing, but if it's more than a user needs to do the tasks they have in mind, then they start to judge it by other factors, like how easy it is to learn. If they absolutely need that level of abstraction, then they may go to the trouble of learning it - researchers and compiler writers (for example) sometimes need this; the mainstream simply doesn't. Of course, some people just love abstraction for itself, above all else - that's their first need.
---
BTW: I can imagine a static/dynamic combination (like Strongtalk) taking off in the mainstream, provided it didn't get in the way. You just have to ask what needs it meets. One thought I've had is to have dynamic typing within modules, but static typing between modules (think: python with static types in library interfaces). I realize this is a subset in power of optional static typing; but I'm thinking more about the needs of users than the capabilities of technology. Interface documentation gets cleaner, bugs are found more easily; yet within modules, it's still easy to create code quickly and change it. It becomes harder to change interfaces (which are hard to change anyway, when other people depend on them). This is the use of it; the needs it meets.
Good static languages have pattern matching and sum types, which gives you the ability to work with tagged data in a syntactically clean way. Dynamic languages just tag all the data. OP's point: are you aware of this? You could be as dynamic and as static as you want in a language like ML or Haskell.
There's something in there about wanting a more flexible type system, but without completely hiding it in an implicit / dynamic system, but I'm not quite getting it as presented. Too bad.
I love static typing and the type safety that languages like Haskell provide me. And I think they have practical benefit too. But I would give my right testicle if static typing advocates would stop encouraging the criticism that this is all academic nonsense.
His post can be rewritten in non-academic lingo. He is saying this: the module system in SML is better than any form of OOP out there. It solves the right problem in the right way. OOP conflates a lot of problems together and a lot of solutions together.
And I think he's right, so let me start on a non-academic way to phrase this. SML modules require less programmer cognitive load, fewer lines of code, compile into tighter machine code, do not have the fragile base class problem, and can express complex relationships in a cleaner way.
Five years ago people were telling me Haskell was the greatest thing since sliced bread but now more often than not people discuss the tradeoffs of its design, much like most other languages.
His book on Standard ML is wonderful: http://www.cs.cmu.edu/~rwh/smlbook/book.pdf
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87....
Software engineering is not a bunch of sequential statements that happen to deliver results that we desire. Software engineering is artfully encoding your human understanding. But that being said, SML is insanely practical if you care about the results as much as you do about the design.