Python vs. Lisp -- please explain

Paul Boddie paul at boddie.org.uk
Thu Feb 23 08:31:26 EST 2006


Alexander Schmolck wrote:
> Rocco Moretti <roccomoretti at hotpop.com> writes:
>
> > I think it's worth pointing out that not all dynamicism is equal, when it
> > comes to difficulty in compiling to machine code.
>
> No kidding (do you have any idea how this thread started out?).

I had to remind myself.

> > Lisp, like the good functional language that it is, has (primarily) immutable
> > values, and minimal side effects.
> [further nonsense snipped]
>
> Please don't spread misinformation about things about which you are clueless[1].

I don't see why you have to be quite so blunt, here. Anyway, some of
the observations made about Python, especially when any comparisons
with Lisp (once corrected) show that Python is more similar to Lisp
than previously thought, are worth considering with respect to things
like type inference and the subsequent generation of low-level code.

> Footnotes:
> [1]  Just as a minor illustrative detail: in python 2 out of 4 builtin
>      collection types are immutable (tuples and strings; newer versions also
>      have immutable and mutable sets) in CL 5 out of 5 are mutable
>      (arrays/vectors/strings, hash-tables, cons cells).

Well, apart from a brief encounter with Lisp back in the microcomputer
era, I've only just got back into looking at the language, and I
suppose I'll eventually find out how the optional type declarations
mentioned occasionally in connection with Lisp actually manage to
handle the harder problems around efficient code generation. I haven't
really studied type systems or compilers in any depth, however, but
having considered the issues for a while I'd like to think that my
rating has progressed from "clueless" to "mostly clueless" by this
point.

Paul




More information about the Python-list mailing list