Mainly Tech projects on Python and Electronic Design Automation.

Wednesday, December 13, 2006

merits of Lisp vs Python

Excerpts from my posts to the comp.lang.python thread about Lisp vs Python:

Date: Fri, Dec 8 2006 10:05 pm

Mark Tarver wrote:

> How do you compare Python to Lisp? What specific advantages do you

> think that one has over the other?

> Note I'm not a Python person and I have no axes to grind here. This is

> just a question for my general education.

> Mark

I've never programmed in Lisp but I have programmed in Cadence Skill a

Lisp inspired language with infix notation as an option. I found Skill

to be a very powerful language. At the time I new only AWK, C, Pascal,

Forth, Postcript, Assembler and Basic. Skill was superior and I came

to love it.

But that was a decade ago. Now, I'd rather a company integrate Python

into their product as I find Python to be less 'arcane' than Skill;

with more accessible power, and a great community.


Analogy time!

You need Pure Maths, but more mathematicians will be working applying

maths to real-world problems. You need research physicists, but more

physicists will be applying physics in the real world. It seems to me

that Lisp and its basis in maths makes people research and develop a

lot of new techniques in Lisp, but when it comes to applying those

techniques in the real world - switch to Python!

Lisp has a role to play, but maybe a language tuned to research and

with its user base would naturally find it hard to compete in the roles

in which dynamic languages such as Python are strongest.

- Paddy.

Date: Fri, Dec 8 2006 10:22 pm

What is it about Lisp that despite doing everything first, way before

any other language, people don't stop using anything else and

automatically turn to Lisp? Maybe there is more to this everything than

the Lisp community comprehends.

Maybe Lisp is to science, as Python is to engineering - with a slight

blurring round the edges?

- Paddy.

Date: Sun, Dec 10 2006 1:53 am

NOBODY expects the Lispers Inquisition!

Our chief weapon is age... age and macros...

...macros and age.

Our two weapons are age and macros....

And mathematical rigour...

Our THREE weapons are age, macros, and mathematical rigour...

...And an almost fanatical belief in Lisps superiority.

Our *four*

AMONGST our weapons...

Amongst our weaponry...

...Are such elements as fear, surprise.... I'll come in again.

Python is fun to use.

Easy to read.

Simple and powerful.

Easy to test.

Easy to maintain.

Fast. Very fast!

- Paddy.

Date: Sun, Dec 10 2006 1:20 am

Paul Rubin wrote:

> "mystilleef" writes:

> > Slow for users who aren't familiar with Psyco, Pyrex and C extensions,

> > sure.

> Anyway it's pretty lousy advocacy for a language to say "well if the

> language is too slow, don't use it, use another langauge like C instead".

Python can be used as a glue language. It is not solely a glue


A lot of people find using Python to script libraries written in other


a way to get things done. Ask the scipy guys or the biopython guys.

The Python community actively encourages groups writing useful


to maintain a Python port, or Python users might wrap libraries


You don't always wrap a module in Python for reasons of speed of


Software testing may well be easier to do in Python than in the

native language of the wrapped library. The library itself may be


used in the dynamic environment of Pythons command line; or used


with other libraries already wrapped for/accessible from Python.

- Paddy.

Date: Mon, Dec 11 2006 7:22 am

Unlike Lisp, Python does not have a ubiquitous compiler. It is therefore made to interface nicely with compiled languages. Other compiled language users see the need for dynamic interpreted languages like Python and maintain links Python such as the Boost Python C++ wrapper. IronPython for .NET, Jython for Java.

Lisp is its own interpreter and compiler, which should be a great advantage, but only if you don't make the mistake of ignoring the wealth of code out there that is written in other languages.

> > Talk to these guys:

> > they have an interesting take on

> No, actually maybe you should talk to them since you seem to think that

> making Python run fast is dangerous, or at least unnecessary.

> > Python has this unsung module called doctest that neatly shows some of

> > the strengths of python:

> Now I'm *certain* that you're just pulling my leg: You guys document

> all your random ten-line hacks in Wikipedia?!?! What a brilliant idea!

Python is newbie-friendly. Part of that is being accessible.

Doctest is about a novel way of using a feature shared by Lisp, that is docstrings. Testing is important, usually not done enough, and doctests are a way to get people to write more tests by making it easier. Does Lisp have similar?

> Hey, you even have dead vaporware projects like uuu documented in

> Wikipedia! Cool! (Actually, I don't know that doctest is ten lines in

> Python, but it'd be about ten lines of Lisp, if that, so I'm just

> guessing here.)

Does Lisp have a doctest-like module as part of its standard


Or are you saying that If you ever needed it, then it would be trivial to implement in Lisp, and you would 'roll your own'? There are advantages

to doctest being one of Pythons standard modules.

- Paddy.

Date: Wed, Dec 13 2006 2:03 am

Oh, you don't like Wikipedia.

There are a lot of people that use Wikipedia. I think some of them

might want to learn to program. I make it easier for them to find

Python by helping to maintain Python within Wikipedia.

If I am researching anything then I like to cross check with

information from multiple sites. that's just good practice.

Some people dislike Wikipedia which is fine. Some people dislike

Wikipedia and deliberately sabotage it, which is vandalism.


Date: Wed, Dec 13 2006 1:15 am

Jesús Carrete Montaña wrote:

> > Fast. Very fast!

> > - Paddy.

> Well, Python certainly is faster than most people doing floating-point

> arithmetic by hand, but I don't think this is the correct argument to use

> against Lisp :-P.

Why not!

Lispers can indeed roll-their-own anything, many do it seems do just

that. But others look at the *time saving* libraries available to users

of Python and think hmm...



Subscribe Now: google

Add to Google Reader or Homepage

Go deh too!

Blog Archive