[pypy-dev] smalltalk as a model?
stephan.diehl at gmx.net
Tue Jan 28 12:40:36 CET 2003
during the last days I got a little bit interested in smalltalk (article in
c't 2/2003). Since smalltalk is already about 30 years old and shares some
similarities to Python, some aspects of smalltalk might ease the effort to
implement Python in Python.
Here are some smalltalk faclets that makes it interesting:
- Everything is an object (even classes and code blocks for example)
- All actions are performed by invoking an object method (even loops)
- there are only 5 keywords and only a couple of "special" characters
- the smalltalk VM is implemented in smalltalk
- smalltalk comes with "batteries included"
With smalltalk in mind, one could write a kind of ProtoPython that has much
less overhead than the existing Python.
Possible features of a ProtoPython (very incomplete):
- smaller set of reserved words ("print","import",etc. shouldn't be reserved
- no operators, '+','-',... will be methods
- at least the for loop could be a method of a (to be defined) list class.
Even if this approach is absolutely ridiculous, just looking at smalltalk
might give some ideas/hints how to construct a self describing language.
Squeak (open source smalltalk runtime): http://www.squeak.org
smalltalk 80 :The Language and Its Implementation (contains details about the
[Python-Dev] Classes and Metaclasses in Smalltalk:
Guido about a mail from Jim Althoff, inventor of smalltalk metaclasses
More information about the Pypy-dev