[Tutor] Python vs. C

Alan Gauld alan.gauld at blueyonder.co.uk
Wed Jan 7 17:18:47 EST 2004


> But there are a lot of C libraries. Aren't there so many C libraries
> that one can essentially program higher-level by using a lot of
> libraries? Or am I overlooking something?

Yes but using in libraries in C is a lot less friendly
than doing a Python import. and because C has no real
namespace support (unlike C++) you often can't use two
libraries together because of name conflicts. And you
can spend a lot of time converting one data struvcture
to another if the libraries are not consistent - which
kills performance of course!

> Me, I know only Python as well, and the only language on my
> 'want-to-learn'-list is Ruby, so that's not a giant leap at all
> (university will teach me Java next year).

You'd be far better off learning Lisp or scheme IMHO. Ruby
is so close to Python that you are not likely to gain much
extra insight. Lisp OTOH will take you into myriad new
possibilities...

> > The good thing is, that python lets you embed C for only the
> > perfomance related parts.
>
> The bad thing is, that learning C only to be able te embed C in a
Python
> program seems a bit odd. There isn't a C-for-Python-programmers
> tutorial, or is there?

Nowadays that wouldn't be a bad idea at all. The huge
effort required to write even a moderate program in C
(compared to Python) means that only using C where there is a valid
reason would be pefectly sane.

When I started programming people were just about giving up
on assembler as a main language. My entire experience with
assembler programming is to implement routines that weren't
fast enough in Pascal or C (recognise a pattern here? :-).
And thats more than enough assembler to teach me all I want
to know about it. C is high level assembler for the 21st Century...

Alan G.




More information about the Tutor mailing list