merits of Lisp vs Python

Bill Atkins atkinw at rpi.edu
Sat Dec 9 16:46:37 EST 2006


"mystilleef" <mystilleef at gmail.com> writes:

> Bill Atkins wrote:
>> Are any of these not subjective?
>
> Objectivity is in the eye of the beholder.

Well, for example, "Lisp uses a fully-parenthesized notation for
writing programs" and "Python has significant whitespace" are both
objective facts.  Agreed?  There's nothing subjective about those two
facts.  Do any of your points approach that level of objectivity?

>> Lisp is much more than a functional language.
>
> Maybe so. But I've only ever appreciated its functional aspects. I
> wouldn't choose Lisp or its derivatives for OO related tasks even if
> I'm high.

Ah yes.  Glad you went into so much detail.

>> Uh huh.  Can you cite examples of this?  Sounds like you're just
>> making stuff up here.  Contrary to popular belief, writing a Lisp
>> macro that warps your mind and introduces a totally un-CL-like
>> semantics is extremely difficult.  Most of the people who are good
>> enough at CL to do it (I'm certainly not one of them) are also
>> experienced enough to know when it's the right choice.
>
> Any sizable Lisp applications will make extensive use of macros. Emacs
> and magic ( the web framework) come to mind. My experience has shown
> that nobody but the person who writes the DSL extension can maintain
> their code. 

What experience is this?

> The benefits of extending a language in a domain specific
> manner are exaggerated. 

Great, it's settled then!

(Look elsewhere in this thread for my post about Peter Seibel's
DEFINE-BINARY-CLASS macro.)

> My observation is that macros are important to
> Lisp and it's derivative because they lack libraries to begin with.
> Common problems solved using macros in Lisp and friends are solved
> using specialized libraries in most other languages. And I like the

Macros are not a substitute for libraries, nor are libraries a
substitute for macros.  Having macros lets you build more powerful and
more expressive libraries.

> specialized libraries route. Meta-programming just doesn't tickle my
> fancy. It just spells maintainance nightmare.

So it's not just macros but metaprogramming as a whole that bothers
you?  You must have an enjoyable time writing programs.

>> And Lisp environments all support getting the macroexpansion,
>> documentation, and source of any unfamiliar macro you might happen
>> upon, so really this is not as much of a problem as you might
>> fantasize it to be.
>
> How's this a good thing? I don't need a Python environment to grok
> Python code.

Nor do you need it to grok Lisp code.  The environment is there to
make your life better.  I was merely responding to your original claim
that it's impossible to make sense of code that uses macros.

>> I don't agree with a lot of what you say in this paragraph, but I
>> you're right that libraries are crucial.  That's why I wish there were
>> more people writing Lisp libraries instead of being scared away by
>> sheer fabrications like the stuff that's appearing in this thread.
>
> People only contribute to things they understand and appreciate. More
> people would be writing Lisp libraries if it was worthwhile.
> Apparently, it doesn't seem to be. A few years ago, I tried to write an
> editor is Scheme. The experience was appalling. I was able to write a
> fully functional prototype editor in less than a week in Python.
> Shockingly, at the time, I had no experience in Python. Guess which
> community I was inclined to contribute to afterwards. I hear stories
> similar to mine time and again, yet the Lisp community won't take heed.
> They'd rather squeal about the superiority of macros and whine about
> their frustrations in Python news groups.

Hmm.  Anecdotal evidence about Scheme (a vastly and fundamentally
different language from Common Lisp).  Again, you've clinched it for
me.

I do believe that the "squealing and whining about macros" was a
response to Pythonistas claiming that macros are not useful.  This was
in turn in response to a foolishly (trollishly?) cross-posted
question.  It is not as if we have invaded your newsgroup.



More information about the Python-list mailing list