other python ideas

Steven D. Majewski sdm7g at Virginia.EDU
Wed Apr 11 17:27:08 EDT 2001


On 11 Apr 2001, Nonexistence wrote:

> "Andrew Dalke" <dalke at acm.org> writes:
> 
> > Douglas Alan:
> 
> [snipped...]
> 
> > > Unfortunately, the Common Lisp module system is unbearably
> > > complex.
> 
> For most purposes, all you need to know about Common Lisp's module
> (package) system are DEFPACKAGE, IN-PACKAGE, and the ":" "::" referencing
> convention; I can't see how that is more complex than what is available in
> Python.  Its spec is lengthy because it is well thought out, and addressed
> most issues that have been discussed so far, and then some.  IMHO, Common
> Lisp's package system is no more complex than warranted, given the scope
> and complexity of the problem it solved, and it is certainly not too
> complicated to use for simpler purposes.
> 

I know Lisp. I use Lisp (in Biology, even!). 
And that doesn't sound like the Common Lisp package system I know! 

 As soon as you try to do something non-trivial using CL Packages,
you will run into symbol clashes, you will have to figure out how to
unintern and shadow symbols, when you do hit a name clash that causes
USE-PACKAGE to fail, you will not be sure exactly what state you're 
left in, what symbols are defined and what aren't, and where they're
coming from unless you wrap everything in some exception handling 
code, and none of the Lisp books (except the Common Lisp spec.) go
very far into describing how to build packages, as opposed to how
to use them. 

 When I sought some answers on Comp.lang.lisp, I got some very helpful
answers and tips. Among them were the admission that, yes, Packages
are one of the dark and hairy corners of Common Lisp and they aren't
explained very well in any of the common texts. 
 Also, several people pointed out, that CL Packages are a package 
system, not a Module system: they are intended to be rather less 
used and larger that Python modules ( You might typically have 3 or
4 packages in a large Common Lisp app, as opposed to dozens or more
Modules in a Python app. ), and they really weren't designed to do
the sort of stuff you typically use Modules for in Python. 

 I'm a fan and user of both Lisp and Python, and Python's module
system is MUCH simpler, easier to use, and easier to comprehend
than Common Lisp packages. 


-- Steve Majewski  <sdm7g at Virginia.EDU> 
-- Univ. of Virgina Dept of Molecular Physiology and Biological Physics





More information about the Python-list mailing list