9fans archive / 2001 / 04 / 668 /    prev next

From: "Douglas A. Gwyn" <gwyn@arl...>
Subject: Re: [9fans] Awk or Limbo ?
Date: Fri, 27 Apr 2001 14:04:38 GMT

Dan Cross wrote:
> ... Plus, the [C++] object system is all wrong,
> forcing bizarre constructs like templates on the programmer, ...

? Templates seem like one of C++'s better features.
That and namespaces.
"Object orientation" fits GUI rather well, but is certainly
not natural for several other common programming needs.

> One of the things about C, though, is that (IMHO) it works best as a
> systems programming language.  As an application development language,
> it has all sorts of traps and pitfalls (indeed, Koenig wrote a book
> by that name once, listing many of them), and other annoyances, like
> the lack of built-in ADTs (why should I build a dictionary myself?
> 99% of the time, I just want to use it; I don't care about how it's
> implemented).

ADTs are easy to build in C; but part of it is that the programmer
himself must provide some of the discipline.

> One does wonder, however, if the Unix utilities had been written in
> another language like Limbo if we would be whitnessing all the stupid
> buffer overrun attacks that the kids are using for bypassing security
> these days.

Buffer overruns are not inherent in C; they're the result of
insufficient care by the undergraduates who whipped together
networking code that the industry then adopted without any
sensible review.  Similar problems occur using other languages.