$\newcommand{\defeq}{\mathrel{\mathop:}=}$

## 2006/09/05

### Dijkstra & C++

DDJ: I understand you are not entirely a partisan of the C++ language.

DK: C++ has a lot of good features, but it has a lot of dirty corners. If you don’t mind those, and you stick to stuff that can be counted well-portable, it’s just fine. There are many constructions that are ambiguous, there’s no way to parse them and decide what they mean, that you can’t trust the compiler to do. For example, you use the “less-than” and “greater-than” signs not only to mean less-than and greater-than but also in templates. There are lots of little things like this, and many things in the implementation, that you can’t be sure the compiler will do anything reasonable with.

Languages keep evolving, and that’s necessary. I find it impossible to write books for archival without resorting to the English language, though. Whatever computer language is in fashion, you can guarantee that within a decade or two it will be completely out of fashion. In my books, I try to write things that aren’t trendy, but are things that are going to be worth remembering for other generations. I’m trying to distill what, in my best judgment, out of thousands and thousands of things that are coming out now, is most deserving to be remembered.

DDJ: You’ve mentioned Edsgar Dijkstra. What do you think of his work?

DK: His great strength is that he is uncompromising. It would make him physically ill to think of programming in C++.

Another lesson we should have learned from the recent past is that the development of "richer" or "more powerful" programming languages was a mistake in the sense that these baroque monstrosities, these conglomerations of idiosyncrasies, are really unmanageable, both mechanically and mentally. I see a great future for very systematic and very modest programming languages. When I say "modest," I mean that, for instance, not only ALGOL 60's "for clause," but even FORTRAN's "DO loop" may find themselves thrown out as being too baroque.

--

yen39/05/2006 1:41 pm 說：

loop竟然是synatactic sugar，我好佩服那時代的人....

yen39/05/2006 1:54 pm 說：