Re: Compiling C++ modules

Al Viro
2006-05-02T13:34:22Z

On Tue, May 02, 2006 at 01:32:05PM +0300, Avi Kivity wrote:
> Like the recent prevent_tail_call() thing? Granted, C++ is a lot tricker
> than C. Much self-restraint is needed, and even then you can wind up
> where you didn't want to go.

Sigh... You know, once upon a time there was a language called
Algol 68. It had a _lot_ of expressive power and was fairly flexible -
both in type system and in syntax. And it had been a fscking nightmare
for large projects. Not because of lack of modularity - that part had
been all right. The thing that kept killing large projects was different;
in effect, each group ended up with a language subset and developed a
discipline for it. And as soon as they mixed, _especially_ if they were
close, but not quite the same, you had an ever-growing disaster.

It's not easy to quantify; each language has dark corners and
there are more or less odd constructs specific to individual programmers
and to groups. And yes, you certainly can write unreadable crap in any
language. The question is, how many variants of "needed self-restraint"
are widespread, how well do they mix and how easy it is to recognize the
mismatches? It's not a function of language per se, so it doesn't make
sense to compare C and C++ as languages in that respect. However, C++
and C _styles_ can be compared and that's where C++ requires more force
to keep a large project away from becoming a clusterfsck.

Sure, you need make sure that different groups of people use
more or less compatible styles anyway; it's just that with C++ you need
tighter control to get the same result. And for kernel it's a killer.