Re:SICP taught in Python 3 - UC Berkeley online
by abecedarius on Friday January 20, 2012 @05:10PM
(#3491442)
When I studied SICP I used XLisp under DOS (no tail recursion, 640k). OTOH Python's default recursion limit of 1000 is even more restrictive than that.
The question I had is how are they going to code a metacircular interpreter? Apparently they make a Scheme interpreter instead.
Re:SICP taught in Python 3 - UC Berkeley online
by Jach on Saturday January 21, 2012 @01:57AM
(#3492845)
What's so hard about using a decorator? You still get the magic, it's just explicit.
Just one possibility: http://code.activestate.com/recipes/474088/
Re:SICP taught in Python 3 - UC Berkeley online
by babarock on Friday January 20, 2012 @05:29PM
(#3491514)
I'm currently reading SICP (the original one). Even though it's LISP instead of Python, the syllabus seems to be very implementation-agnostic. Tail recursion optimization is nice and comes in handy, but I don't think it matters much in the choice of a language to teach this course.
Focus is naturally put on how a language looks on paper, more than how it executes on the machine.
My 2c.
Re:SICP taught in Python 3 - UC Berkeley online
by tikhonj on Friday January 20, 2012 @05:44PM
(#3491561)
I remember the text--and the old course--actually spent a good bit of time talking about proper tail calls and "iteration" vs "recursion". We talked about how the code behaves differently--e.g. space usage--and about how to identify the two types.
Also, it's the Structure and Interpretation of Computer Programs; naturally, the first bit talks about how programs look (structure), but the second bit (mainly chapters 4 and 5, if I remember correctly) talks about exactly that: how to execute code on the machine. The last chapter, in fact, introduces a register-based language not unlike assembly.
Oh, I see, just give them trivially small data sets: http://www-inst.eecs.berkeley.edu/~cs61a/sp12/labs/lab8/lab8...