Off topic C question

Philip Swartzleonard starx at pacbell.net
Tue Apr 9 03:25:04 EDT 2002


Ryan || Mon 08 Apr 2002 07:58:05p:

> I know this is way off topic, but I figure the heavy hackers here
> will understand my mindset better than those at comp.lang.C

I don't know if I count as a heavy hacker, but what the heck =)

> I have been doodling with python (nasty habit I know but I have to
> do somthing with my snake) and think I may be ready to learn a
> second language.

Computer languages are surprisingly like human ones, in that learning a
second teaches you a lot about your first.

> I am leaning towards C over C++ and Java even though I loose objects
> it will ground me firmly in functional programing.

Well, I think you mean procedural programming ... functional
programming is that kind of weird abstract alien lambda stuff that you
find in LISP and such (at least that's how I understand it.)

C is a nice solid language, and quite usable provided your programs
don't get exceedingly complex, personally I really can't recommend it
for large projects after what I've seen in just a few medium sized
ones. That's what C++ is for... dealing with insane amounts of
complexity without exploding... which is why it itself is so complex
and hard to learn. But if you started at python, and already
understand all of this fancy object stuff, you don't really have to
worry about all that 'learn c or c++ first' arguing anymore.

Oh, and raw C is easier to use as a python extension, I think. That
might be nice =).

> I am wondering what book would be the best for a begginer? The two I
> have seen that look interesting are

www.accu.org is the place to go for book reviews and recommendations
for c and c++. If you had asked this question in the form you
mentioned, someone would have dropped this link within ten seconds :).

> C for Dummies (parts one and two) or

I really don't know anything about this book, but I've heard that the
dummies series in general tends to be insulting and talks down to you
because, well, you're a dummy ;).

> The C Programming Language
> by Brian W. Kernighan, Dennis M. Ritchie.

I don't really use C very much anymore, but this book is where I go
when I need to remember what something or other does. If you are just
starting in the language, it is probably too dense and too brief in
explanation (unless you're good at that 'hear one, know ten' thing :).
(Also, i doubt that the first one's still in print, but make sure you
buy the second edition, that covers standardized C)

> I am looking for some input from someone who knows and knows the
> problems I will face coming from a __nice__ language like python.
> Thanks (and sorry about the off topic)

The first problem: Learning out of date or bad practice things like
'void main()' from out of date or just plain bad books and teachers.
This is what ACCU and usenet are for =).

The second, and biggest problem: Pointers. Pointers pointers pointers
and some more pointers. Pointers are to C what subject-object-verb
sentence order is to Japanese: they are The Thing That Makes The
Language Hard To Learn. Coming from a background where you already
understand programming logic and some data structures and what not
should make things _much_ easier than they could be, but make sure you
fully and throughly understand this topic before you try to do much
of anything with dynamically allocated ... anything, cause this is how
all of it must be handled in C.

Okie, that's enough ranting about C on a Python form =)

-- 
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com



More information about the Python-list mailing list