Experiences/guidance on teaching Python as a first programming language

rusi rustompmody at gmail.com
Wed Dec 18 23:05:28 EST 2013


On Thursday, December 19, 2013 7:10:53 AM UTC+5:30, Roy Smith wrote:
>  Grant Edwards wrote:
> > I've always felt that there are features in C that don't make a lot of
> > sense until you've actually implemented a compiler -- at which point
> > it becomes a lot more obvious why some thing are done certain ways.

> Example?

> I suspect what you mean is, "There are some things that don't make sense 
> until you understand computer architecture".

One way of rephrasing what Grant is saying is:
"You cannot be a C programmer without being a system programmer"

This certainly includes machine (hardware) architecture.

But it includes much else besides, which can generally be subsumed under
the rubric "toolchain"

A python programmer can write foo.py and run:
$ python foo.py

A C programmer writes foo.c and has to run the sequence:
$ gcc foo.c
$ a.out

So far the difference looks minimal. However it does not stop here.
Soon the foo has to split into foo1.c and foo2.c.  And suddenly you need to
understand:

1. Separate compilation
2. Make (which is separate from 'separate compilation')
3. Header files and libraries and the connection and difference

Now if youve taught a few classes you will know what a hell each of these is.
In particular, every C teacher struggles with:
"stdio.h is the standard library"

And all this has not yet touched the labyrinths of linker errors with
the corresponding magic spells called ranlib, nm etc

Got past all this kid-stuff?
Now for the Great Initiation into Manhood -- autoconf

So...

Is all this core computer science?
Or is it the curiosities of 40 year old technology?



More information about the Python-list mailing list