Re: [gtk-list] C vs C++ blah blah blah
- From: Elliot Lee <sopwith redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] C vs C++ blah blah blah
- Date: Sun, 15 Jun 1997 02:02:46 -0400 (EDT)
On Sat, 14 Jun 1997, Chris Wedgwood wrote:
> Still not as clean as pure C++.
Beauty is in the eye of the beholder ;-)
> gtk is in C. Its not going to be re-written in C++, so why discuss the
> issue any further?
>
> Also, delete is a reserved word in C++ - so gtk should perhaps be changed to
> reflect this. (ie. not use it).
Actually 0.99.10 was fixed WRT this.
> This is linux 2.0.30 with all the latest - gcc version 2.7.2.1.. I'm
> sure it's the linktime for the C++ version that kills it..
>
> It will partially, normally C++ programs also requires libg++.so, libm.so
> and libstdc++.so. Linked statically they are almost (if not) the same size
> and the same speed on my machine.
>
> gcc/g++ produce the same code for the both the C & C++ version of
> hello-word.
>
> x:~# time hello-c
> hello world
>
> real 0m0.002s
> user 0m0.000s
> sys 0m0.000s
> x:~# time hello-cc
> hello world
>
> real 0m0.002s
> user 0m0.000s
> sys 0m0.000s
> x:~#
>
> P.S. This uses the bash-2.01 time builtin. The *bsd time thingy be default
> doesn't have enough resolution. Still, these numbers are too small to
> count for much.
Benchmarking hello world is a really valid test, eh?
Get something like povray, compile it as C code and again as C++ code, and
compare the two. That should be a bit better benchmark.
Why not use Objective C instead of C++ if you want OO? It's much cleaner
and has features that C++ doesn't. It also is supposedly more compatible
with plain C than C++ is.
Hmm, an ObjC binding of gtk, that could be interesting.
GNUstep will be cool if/when it matures.
Blathering,
-- Elliot http://www.redhat.com/
How do you explain school to a higher intelligence?
-- Elliot, "E.T."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]