Python aka. Smalltalk Lite?

Bijan Parsia bparsia at email.unc.edu
Sun Feb 13 00:35:51 EST 2000


Fredrik Lundh <effbot at telia.com> wrote:

> Gareth McCaughan wrote:
> > (Smalltalk syntax looks funny, too, but it isn't so fundamental
> > to the language. Perhaps a more approachable version of Smalltalk
> > might be possible.)
> 
> you mean Python?

Er...no! ;)

> (yeah, I know that we haven't implemented everything
> just yet, but we're working on it ;-)
> 
> seriously, what are the major shortcomings in Python
> from a Smalltalk professional's perspective?

I don't know if they're *shortcomings*, but I find Python to have a very
different feel. There's alignment up to a certain point and then things
start going haywire (for me).

(I've tried porting Python to Smalltalk and Smalltalk to Python, and for
each there were a *slew* of things that were really easy and then a
subtantial chunk that left me whimpering. But then, I whimper pretty
easily.)

(Funny, on the Squeak list someone refered to Python as basically
Smalltalk, but consensus, well, ok, *my* post, said otherwise ;))

> let's see:
> 
> -- no blocks (lambda doesn't really cut it)
> -- type/class dichotomy (CPython implementation)
> -- no garbage collection (CPython implementation)

Interestingly, some early Smalltalk implementations used GC.
 
> what else?

Here's are some whimper inducing things for me:
        No class methods
        No super
        Relatively heavy syntax (I suspect I would whimper less if I 
                        were using Python more)
                (This includes things like good ol' special forms 
                (if-then, etc.), which might be *preferable* to 
                folks want Smalltalky semantics with a "more normal"
                syntax....but they drive me nuts ;)
        
                But semantically, control structures, etc. are all
                messages (not *quite* the same as method invokations.
                And I don't quite see how to get that in Python
                without wildly altering it's basic flavor.)

There's stuff that Python *has* that are a tad discomforting, like
modules. Smaltalk is just stretching out to explore various namespace
mechanisms, and I'm not sure how it'll play out. 

Given how central an abstraction technique modules are, it's really no
surprise that class organization would feel so different. I'm not sure
that this is a semantic issue (i.e., I don't know if python classes are
less "able" than Smalltalks, other than in the specific ways I've
mentioned). It shall be interesting to see what happens to Smalltalk
coding patterns in the presence of namespaces.

I'm sure there're other differences, but I can't think of them right now
:)

Cheers,
Bijan Parsia.



More information about the Python-list mailing list