Mailinglist Archive: opensuse (4054 mails)
| < Previous | Next > |
Re: [SLE] Question for you programmers and those who onlye tinker w/ programming. RE Python and QT , esp in concert.
- From: Anders Johansson <andjoh@xxxxxxxxxx>
- Date: Tue, 24 Jan 2006 21:15:15 +0100
- Message-id: <43D68AD3.1060200@xxxxxxxxxx>
Brad Bourn wrote:
> On Tuesday 24 January 2006 1:12 pm, Per Jessen wrote:
>> But aren't you contradicting yourself - "C++ can do C" because you could
>> convert C++ code into straight C-code - but then you've effectively got
>> "C doing C++", havent' you? :-)
>
>
> Not really I don't think.
>
>
> I've written routines in straight C to use on a release platform, but I use Qt
> to make a test harnes GUI for me to test the C platform code.
>
>
> I can't however use my C++ stuff with the platform's C compiler.
>
>
> e.g. g++ can compile striaght C code. the watcom C compiler can't do
> anything with my C++ code.
C can accomplish anything C++ can do (or indeed anything any other
language can do), but that's not the same as saying a C compiler can
read C++ code straight. But the very fact that g++ is written in C makes
it obvious that C++ can do nothing that C can't.
A C++ compiler on the other hand can read C code unchanged, because C is
a pure subset of C++
> On Tuesday 24 January 2006 1:12 pm, Per Jessen wrote:
>> But aren't you contradicting yourself - "C++ can do C" because you could
>> convert C++ code into straight C-code - but then you've effectively got
>> "C doing C++", havent' you? :-)
>
>
> Not really I don't think.
>
>
> I've written routines in straight C to use on a release platform, but I use Qt
> to make a test harnes GUI for me to test the C platform code.
>
>
> I can't however use my C++ stuff with the platform's C compiler.
>
>
> e.g. g++ can compile striaght C code. the watcom C compiler can't do
> anything with my C++ code.
C can accomplish anything C++ can do (or indeed anything any other
language can do), but that's not the same as saying a C compiler can
read C++ code straight. But the very fact that g++ is written in C makes
it obvious that C++ can do nothing that C can't.
A C++ compiler on the other hand can read C code unchanged, because C is
a pure subset of C++
| < Previous | Next > |