Re: C++ and threading howto for linux dev



Boyd Stephen Smith Jr. wrote:

In <20090811112355.2e38a8a3@xxxxxxxxxxxxxxxxxxxxxxxxx>, Micha Feigin
wrote:
c is a subset of c++ so you can use the c api inside c++.

Not entirely true. ISO 9899:1999 (C Programming Language) has a number of
types that are not in ISO 14882:2003 (C++ Programming Language), at least.
Also, the upcoming "C++1x" standard will not include the variable-length
arrays feature from "C99". There are certain valid C constructs that will
cause errors in C++, not limited to using C++ keywords as C identifiers or
using the sequence "//*" in code.

There is a common subset of C and C++ and it includes the majority of the
C language and standard library, but do not mistake C as "C++ without
classes".

Thanks Boyd, I'm not that familiar with C or C++ specifications, but that's
exactly what's happening when trying to use pthreads directly from c++ and
I understand completely well why.
It needs a wrapper but things with threads (actually concurrency) are more
complicated, so I think libboost would be for me the way to go. It looks
handy.

I'm not sure how much advantage and disadvantage is to write the code or
parts of it in C and the rest in c++. Not even sure if it's possible
without any cavities, but it fun to learn.

regards




--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: [OFF] Re: UPDATE ON FREE UNIX ROOT ACCOUNT ON SOLARIS 10 SPARC
    ... don't believe the C programming language is restricted to ... opinion talk about the popularity statistics of the C ... huge body of C code that is *not* ISO C. ... But keep in mind that these are people who claim to believe in the ...
    (comp.lang.c)
  • Re: A lurkers take on C.L.C pedantry
    ... The C programming language existed before ISO C, ... Neither side has the right to impose its topicality opinion on ... No reason either side has to attack ...
    (comp.lang.c)
  • Re: [OT I think] Which Distro?
    ... alleged insult. ... Never had much love for or affinity with the "C programming language" ... Considering the vagaries rampant on mailing lists etc.. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Which programming Language
    ... Subject: Which programming Language ... I hear that Python is an excellent learning language. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)
  • Re: [OFF] Re: UPDATE ON FREE UNIX ROOT ACCOUNT ON SOLARIS 10 SPARC
    ... the other situations, then that's selective substitution, which ... I agree that comp.lang.c means the C programming language. ... I don't agree with is your selective substitution of "ISO C" ...
    (comp.lang.c)