On 6/20/07, Derek Kalweit <[EMAIL PROTECTED]> wrote:
> > > Take a look at a site like Sourceforge.  90% of the active projects
> > > will be plain C.
>
> > Well, they all say "C, C++" for the language as far as I can see. So I
> > don't know whether that effectively means C++. Since C and C++ are not
> > the same thing.

They're mostly plain C, at least the projects I've worked with.

> C++ is mostly just a newer version of C with support for object
> orientation, some different syntax, more lenient rules on some things,
> exception handling, etc. And of course many C++ libraries. At the
> core, they're very much the same. In fact, many programs have a mix of
> straight C and C++ source files, all compiled to obj files and linked
> together to form an executable. They both compile to assembly/machine
> code meaning both can theoretically be just as fast as the other.

It's not always that easy.  With a C compiled library you can pretty
much link it to any language.  C++ does things like name munging to
encode method arguments and return values into the name of the
routine, which is meaningless to other languages (and even other C++
compilers).

C is about as close to assembler you can get in a language.  C++ has
more overheads than C (though if you write plain C in a C++ compiler
it should be as fast).

I currently have 3 C compilers (all gcc) setup here: PocketPC (ARM),
Sega Dreamcast (SH-4) and Windows (x86).

-- 
Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to