Computer Chess Club Archives




Subject: Re: C and C++ --- NPS

Author: David Rasmussen

Date: 11:43:23 12/25/02

Go up one level in this thread

On December 25, 2002 at 14:24:55, Matt Taylor wrote:

>>What's the problem with 'extern "C"' ?
>That I forget to do it, that I don't want to have to do it.

OK. Inability to use a tool shouldn't be blamed on the tool.

>Aside from
>namespaces, the only purpose name decoration serves is type checking. Obviously
>disabling the decoration will disable type checking.

Eh. Yeah, exactly, that's the point. Type safety was _very_ important in the
design and evolution of C++, and so was the ability to work with current linker
technology, to be able to cooperate with other languages. Of course you lose
type safety when specifying C linkage. That is exactly what it means, in fact.
But since you don't have type safety in C in general, there is no loss. It's
just an extra feature. It's like "you can interface with all sorts of languages
if you want, but of course if the linkage required for that language isn't
typesafe, it wont suddenly become so when used from C++". I really don't see
this as a problem in practice. I very rarely interface with C or assembly
language to any larger degree, and if I do, I will make a typesafe interface
from C++ first.


This page took 0.08 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.