[plt-scheme] Python Too Dynamic?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Dec 31 13:10:56 EST 2004

It depends on how you do it. Even in Scheme-based courses, I follow the 
HtDP recipe:

An Expression is one of:
  -- (make-variable Symbol)
  -- (make-if Expression Expression Expression)
  -- (make-lambda Listof[Symbol] Expression)
  -- (make-app Expression Listof[Expression])
  ... ...

A Definition is one of:
  -- (make-define Symbol Expression)
  -- (make-define-struct Symbol Listof[Symbol])
  -- ...

You can do this for Python or whatever. The rest is parsing and pretty 
independent of interpretation. My hunch is that writing read for Scheme 
(incl. its Number system) is more complicated than parse for Python but 
I might be overlooking Python's complexities (which I am not totally 
aware of).

Happy New Year -- Matthias


On Dec 31, 2004, at 1:57 AM, Michael Vanier wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>> Cc: plt-scheme at list.cs.brown.edu
>> From: Matthias Felleisen <matthias at ccs.neu.edu>
>> Date: Wed, 29 Dec 2004 17:28:10 -0500
>>
>>   For list-related administrative tasks:
>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>> Steve, we (PLT people) have been teaching the construction of Scheme
>> interpreters in Scheme for, oh, about two decades now. So don't let
>> those Pythonistas fool you in the Python in Python thingie. Every
>> undergraduate from our courses knows how to do that.
>>
>
> Note, though, that just from a syntactic standpoint it's much harder to
> implement Python in Python than it is to implement Scheme in Scheme 
> because
> there's so much more syntactic sugar in Python than in Scheme.  I 
> would say
> that one of the defining features of Lisp-like languages is that they 
> are
> the languages in which writing a metacircular evaluator (X implemented 
> in
> X) is easiest.  Looking at McCarthy's original Lisp paper shows (in 
> which
> he writes a metacircular evaluator) suggests that this was one of the 
> goals
> of the language (although McCarthy's evaluator used somewhat more
> complicated M-expressions instead of Scheme-like S-expressions).  This 
> was
> also long before macros hit the scene.
>
> Mike (who likes both Python and Scheme)
>
>
>
>



Posted on the users mailing list.