Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Any reason to use C?

Author: Dieter Buerssner

Date: 16:00:41 07/28/03

Go up one level in this thread


On July 28, 2003 at 18:26:29, Gerd Isenberg wrote:

>References, function inlining and namespaces are enaugh to use C++.

Gerd, references is enough for me, to avoid C++. In the "old days", when I read
code with a function call, like foo(a), I was sure, that a will be the same
after the function call, than before. With C++, I cannot be sure anymore. If I
want to make a changable by a function call, I use &a in C. All pretty much self
documenting. Not anymore in C++.

It may even be a performance issue. I read your suggestion about the small
inline functions vs. macros. I basically agree. But when using reference
paramaters (your example did), things might be very different. This might make
it very difficult or even impossible to make a good optimization for the
compiler.

Function inlining is part of the ISO C Standard of 1999. Not all compilers
support it.

Regards,
Dieter



This page took 0.02 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

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