Can anyone recomend a good intoduction to C...

Alex Martelli aleaxit at yahoo.com
Fri Mar 9 16:57:47 CET 2001


"Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote in message
news:slrn9ah66m.k09.qrczak at qrnik.zagroda...
    [snip]
> I dislike C too, but at least there is an area where it's a good
> choice: low-level programming, i.e. OS interface, OS itself, runtime
> systems for other languages, time-critical modules for other languages.
> C++ doesn't fit there, is unnecessarily too complicated for these
> tasks, and it isn't a high level language either.

C++ fits *perfectly well* for these tasks.  For example, in writing
Python extensions I'm _vastly_ more productive with the Boost Python
Library (BPL), the rest of Boost (www.boost.org), and the standard
C++ library, than in bare C -- and BPL (just as the rest of Boost and
the standard C++ libraries) just wouldn't be possible in C.

Similarly, high-performance COM objects are a *SNAP* to write in
C++ (here, thanks to the ATL framework) and a *HORROR* to write
in C.  Yes, I write from experience -- I do use C _when this is
absolutely necessary_, and, in particular, I used it for my Win32
tutorial, freely available online (in Italian, sorry), which
includes piece of simple C-coded COM _client_ code (_server_
code would be a lower-down-yet circle of Hell!-), so you can see
the kind of mess that results.  (Microsoft code examples in the
Platform SDK are also good - they do have some hot coders!-).

I haven't gotten into XPCOM yet, but I suspect I'll find a very
similar situation there -- components far easier to develop in
C++ (even if constrained to a limited subset), particularly with
some appropriate framework, and a LOT more work in C.


Alex






More information about the Python-list mailing list