Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

Rob Gaddi rgaddi at technologyhighland.invalid
Tue May 12 13:03:45 EDT 2015


On Tue, 12 May 2015 08:11:25 -0700, zipher wrote:

> On Monday, May 11, 2015 at 9:04:24 PM UTC-5, Steven D'Aprano wrote:
>> On Tue, 12 May 2015 05:01 am, beliavsky at aol.com wrote:
>> 
>> > Yale has taken the unusual step of outsourcing its introductory CS
>> > class to Harvard, which uses C as the main language in its CS50
>> > class.
>> 
>> And another generation of new programmers will be irreversibly damaged
>> by exposure to C...
> 
> Come on, C is perfect for computer engineering students.  For CS
> students, it's of mixed value.

And that's how you train CS students to write inefficient code that takes 
orders of magnitude longer to run than it should.

Is that a true array or a linked list?  "It's a high level language, 
that's just an implementation detail." Yes, but it's an implementation 
detail that determines whether even the simple act of looking up element 
n is O(1) or O(n).

C teaches you the language of the computer.  Understanding it allows you 
to grasp what your high-level code is actually doing, and why and when a 
list (array) is more efficient than a dict (hashtable).  Because you've 
written a dynamically resizing list, and learned the perils of having to 
realloc() as the size grows.  And you've written a hashtable, and 
understand the expense of the hashing function, and the tradeoffs between 
wasted memory and having to wade at O(n) pace through a linked list of 
collision candidates.

A firm grasp of C will make you a better programmer in any language, even 
if you haven't written a line of it in 20 years.  It's the ability to 
read a map.  A lack of C is the person blindly following their GPS and 
hoping for the best.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.



More information about the Python-list mailing list