But that probably doesn't matter. So it's better, on the whole, to preserve what you can out of the current book by adapting it to Python than losing it completely.
Things will get lost in translation and substantive changes will have to be made. That's why writing textbooks is a creative endeavor rather than just updating the English used in older texts.
Writing a Scheme interpreter in Python would force people to learn all of that Scheme anyways, and it wouldn't feel like such a revelation that you understand what the interpreter is actually doing.
Writing a Python interpreter in Python would force people to learn a lot more about parsing techniques. That would add a lot more material, and the code would be substantially more complex, thereby obscuring the pedagogical point.
The point is once you scan,tokenize and parse you get an AST. You already got a language that works on AST. I don't think python's AST is gonna differ a lot from scheme's.
They don't write a scheme(subset) interpreter in scheme. They write a scheme interpreter in scheme.
Unfortunately that point is false as well. The AST for a Python program will generally involve a lot of message dispatches that won't exist in the AST for a similar Scheme program.
To get a sense of the difference, in Python if you yield, your code actually gets turned into a class with certain methods that get called repeatedly, and restart your method at the correct place with the correct state. By contrast equivalent code in Scheme will somewhere under the hood have call-with-current-continuation, which works by very different mechanics.
And the main value of SICP, at least for its fans, is the pedagogic value of the language. It starts off with pure functional programming and then introduces assignment much later, and discusses its tradeoffs.
The "main value" cited also assumes "pure functional programming" is worthwhile. That is not an uncontroversial opinion, and does little to make the case for SICP to people not already convinced.
> That is not an uncontroversial opinion, and does little to make the case for SICP to people not already convinced.
That was not an unconsidered viewpoint, if you read what I wrote. I said "for its fans". I am not attempting to make the case for SICP; that book doesn't need my help.
You have some very strange ideas about Python that appear to have little relation to reality.
http://stackoverflow.com/questions/141642/what-limitations-h...
And Guido has said that he intentionally crippled the lambda keyword.
http://www.artima.com/weblogs/viewpost.jsp?thread=147358
Anyway, why are you getting offended? Python is a great language.
Some people just think Scheme teaches certain aspects of programming better for various reasons. For instance, in Scheme, the program listing is a representation of the parse tree. Python will construct a similar tree, but this is not revealed to the programmer as much. So if you learn Scheme you can imagine how what Python is really doing (and writing parsers is much simpler because you have an intuitive sense of how they work).
And the ability to manipulate code as data is exclusive to s-expression based languages. This enables (for instance) truly hygienic macros. You don't get that in Python.
On the other hand, object-oriented programming in Scheme is pretty terrible. The part in SICP where they try to simulate it in Scheme is a travesty. Although it is somewhat illustrative of what's "really" going on, without the syntactic support it just looks ridiculous. So that's a win for Python.
Similarly, whipping up a complex data structure takes far fewer keystrokes, and is more transparent, in Pythonic syntax. Just as Scheme benefits from having built-in lists, Python wins even bigger for having lists and dictionaries everywhere. And overall Python is objectively more practical, with its vast array of libraries and ease of use.
I honestly don't know if you're trolling or are just being partisan. Not all languages are the same and there isn't any one "winner" language.
As for your personal attacks on me... I dispute statements you made that I consider to be utterly wrong, and you say I'm "getting offended" and "trolling"? Now I'm offended.
I look up and down the comments on here and I see all sorts of people making blanket statements about how great Scheme is, yet when I argue a couple specific points you brought up about Python, I'm being the partisan troll? WTF?
That fact reduces cognitive load on the reader, freeing up mental resources that can be applied to the concepts presented.