merits of Lisp vs Python

M

Mark Tarver

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
 
M

Mathias Panzenboeck

Mark said:
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 do not know much about Lisp. What I know is:
Python is a imperative, object oriented dynamic language with duck typing, List is a declarative,
functional dynamic language -> those two languages have different scopes.

For more Information:
http://en.wikipedia.org/wiki/Functional_programming
http://en.wikipedia.org/wiki/Object-oriented_programming
http://en.wikipedia.org/wiki/Dynamic_programming_language
http://en.wikipedia.org/wiki/Lisp_programming_language
http://en.wikipedia.org/wiki/Python_(programming_language)
 
M

Mark Tarver

Paul said:

Thanks; a quick read of your reference to Norvig's analysis

http://norvig.com/python-lisp.html

seems to show that Python is a cut down (no macros) version of Lisp
with a worse performance. The only substantial advantage I can see is
that GUI, and Web libraries are standard. This confirms my suspicion
that Lisp is losing out to newbies because of its
lack of standard support for the things many people want to do.

Mark
 
F

Fredrik Lundh

Mark said:
seems to show that Python is a cut down (no macros) version of Lisp
with a worse performance.

"can be seen as, by a Lisp programmer", perhaps. it's not like anybody set out
to make a Lisp-with-other-syntax but "failed"...

</F>
 
R

Richard Brodie

seems to show that Python is a cut down (no macros) version of Lisp
with a worse performance.

Performance claims are always controversial. So, Python is much slower
doing array multiplication, when you hand roll it, instead of using the
standard numerical packages available.

I see that the effbot has already responded the first part.
 
I

Istvan Albert

Mark said:
seems to show that Python is a cut down (no macros) version of Lisp
with a worse performance.

or maybe it shows that Lisp is an obfuscated version of Python with
lots of parentheses, backward logic, and complicated constructs that
run faster.

i.
 
H

Harry George

Mark Tarver said:
Thanks; a quick read of your reference to Norvig's analysis

http://norvig.com/python-lisp.html

seems to show that Python is a cut down (no macros) version of Lisp
with a worse performance. The only substantial advantage I can see is
that GUI, and Web libraries are standard. This confirms my suspicion
that Lisp is losing out to newbies because of its
lack of standard support for the things many people want to do.

Mark

It is not just a newbie thing. Even people who are reasonably fluent
in Lisp use Python for many tasks, and some make python the default
with Lisp as a special case. It would probably be fair to say that
the more you know about a variety of languages, the more you
appreciate Python.
 
T

Tim Chase

How do you compare Python to Lisp? What specific advantages do you
think that one has over the other?

Easy...
Python reads like pseudocode
Lisp reads like line-noise (much like most Perl or Ruby code)


Python makes better use of my time as a programmer because it
maps fairly closely to how I think, as well as being easy to pick
up when you've been away from the code for several months.

-tkc
 
A

Alex Mizrahi

(message (Hello 'Richard)
(you :wrote :eek:n '(Fri, 8 Dec 2006 14:08:09 -0000))
(

??>> seems to show that Python is a cut down (no macros) version of Lisp
??>> with a worse performance.

RB> Performance claims are always controversial. So, Python is much slower
RB> doing array multiplication, when you hand roll it, instead of using the
RB> standard numerical packages available.

heh, do you have "standard numeric packages" for everything? maybe then
we'll make standard programs for everything -- that will obsolete "slow"
"custom scripts" and we'll just use shell to select what program we want to
run?
certainly, it's possible to write code in C and use FFI to access it, but
it's not suitable for rapid prototyping/fast development, when requirements
may change, or you're just experimenting with different methods.

it's interesting than as of bare "interpreter overhead", python is aprox
order of magnitude (10 times) slower than lisp interpreters. it's also
interesting, that python, perl, php and ruby show very similar peformance,
while lisp and scheme implementations show large improvements -- it makes me
think that there's something "pathalogically scripting" in their
specifications (maybe some obligatory use of strings for method dispatch?).

note that i've mentioned "lisp interpreters" above. as for lisp _compilers_,
they run lots faster than lisp interpreters.

please check http://shootout.alioth.debian.org/
to compare Python to Lisp SBCL. lisp is faster more then 10 times in many
benchmarks, and even more than 100 times faster in two benchmarks.
unfortunately there's no lisp interpreters (CLISP) in the benchmark.

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity")
 
A

Alex Mizrahi

(message (Hello 'Istvan)
(you :wrote :eek:n '(8 Dec 2006 06:11:20 -0800))
(

??>> seems to show that Python is a cut down (no macros) version of Lisp
??>> with a worse performance.

IA> or maybe it shows that Lisp is an obfuscated version of Python

hell no, lisp's syntax is much easier than python's since it's homogenous
(and certainly lisp was invented much 30 years before Python, so that's
Python uses Lisp features)

IA> with lots of parentheses,

that make logic more explicit

IA> backward logic,

??

IA> and complicated constructs that run faster.

no, there are no complicted constructs -- just it's designed with 30-year
history in mind, not like "let's make another simple scripting language".

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity")
 
K

Ken Tilton

Mark said:
How do you compare Python to Lisp?

Lisp programmers are smarter and better looking. And better programmers.
Not sure if that is what you were after, though.
What specific advantages do you
think that one has over the other?

http://www.googlefight.com/index.php?lang=en_GB&word1=parentheses&word2=white+space

Ouch.

hth,kt

--
Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

"Well, I've wrestled with reality for thirty-five
years, Doctor, and I'm happy to state I finally
won out over it." -- Elwood P. Dowd

"I'll say I'm losing my grip, and it feels terrific."
-- Smiling husband to scowling wife, New Yorker cartoon
 
W

Wade Humeniuk

Mark said:
How do you compare Python to Lisp? What specific advantages do you
think that one has over the other?

Since the late 1950's Lisp has participated in the development of
modern (present day) programming practises. It has shaped and been
shaped by the minds of just not programmers, but people involved
in dealing with the larger impacts and possibilities.
Its been there, is here, and will continue to be there in the future.
Lisp is a human construct that is a force to be reckoned with. Its
construction reflects something very deep and fundamental about
computing. So, it depends on what you want.

What do you want?

W
 
R

Richard Brodie

heh, do you have "standard numeric packages" for everything? maybe then we'll make
standard programs for everything -- that will obsolete "slow" "custom scripts" and we'll
just use shell to select what program we want to run?

No, I was observing that, faced with a matrix multiplication problem, most
sensible Python developers would do "apt-get install python-numeric" or
equivalent. Trying to do it in pure Python would be the wrong tool for the
job. If you think that's a weakness of Python compared to Lisp, then so
be it.
 
R

Rob Thorpe

Mathias said:
I do not know much about Lisp. What I know is:
Python is a imperative, object oriented dynamic language with duck typing,

Yes, but Python also supports the functional style to some extent.
List is a declarative,
functional dynamic language

Lisp is only a functional language in that it support both functional
and imperative programming styles. Duck typing is almost identical to
latent typing in Lisp.
And, Common Lisp at least is object orientated.
-> those two languages have different scopes.

Their scope is actually very similar. Learn about lisp and you will
soon discover their similarity.
 
S

Soni Bergraj

Mark said:
seems to show that Python is a cut down (no macros) version of Lisp
with a worse performance.

If you wont to put it this way, go for it. But if you care to give it a
closer look, you may understand that Pythons main advantage is not
seizable by feature and performance charts.

Regards,
 
K

Kay Schluehr

Alex said:
it's also
interesting, that python, perl, php and ruby show very similar peformance,
while lisp and scheme implementations show large improvements -- it makes me
think that there's something "pathalogically scripting" in their
specifications (maybe some obligatory use of strings for method dispatch?).

"The most unusual features of the SBCL compiler (which is very similar
to the original CMUCL compiler, also known as Python) is its unusually
sophisticated understanding of the Common Lisp type system and its
unusually conservative approach to the implementation of type
declarations.

These two features reward the use of type declarations throughout
development, even when high performance is not a concern. Also, as
discussed in the chapter on performance (see Efficiency), the use of
appropriate type declarations can be very important for performance as
well."

http://www.sbcl.org/manual/Handling-of-Types.html#Handling-of-Types

If you'd read the docs of the tools you admire you might find the
answers yourself.
 
C

Carl Banks

Mark said:
This confirms my suspicion
that Lisp is losing out to newbies because of its
lack of standard support for the things many people want to do.

Whoa there, that's a pretty big logical jump there, don't you think?

Consumer choice can never be boiled down to one thing; there are so
many factors. No one knows the whole answer. I certainly don't. (If
I did, I'd be courteously turning down the Nobel Prize for Economics on
account of being so rich I really didn't need the extra pocket change.)

I have no doubt that what you say is a contributing factor, but if I
had to guess the main reason why Lisp is losing out to newbies, I'd say
it's first impressions. When newbies see Python they say, "Ok, I can
kind of follow that, it doesn't look too hard to learn." When they see
Lisp they say, "WTF IS THAT???"

It's kind of sad, in a way, that a superficiality would be so crucial.
(Not that I think outward appearance is all superficial--I think humans
have evolved and/or learned to regard as beautiful that which minimizes
effort--but it's not the whole story and not basis for a whole
judgment.)


Carl Banks
 
H

hankhero

One overlooked advantage for Lisp over Python is a better development
environment, for me that means Slime for Lisp. For Python I have
several years of experience with IDLE and the win32 Ide, and Slime is
the winner. Press a key and the function you are editing is recompiled
and loaded into memory. The crossreference and the object inspector is
very nice. How about fuzzy-complete, I only have to write de-me and
press tab, and I get define-method-combination.
Slime coupled with the paredit structured editing mode, which lets you
edit Lisp code as list structure rather than characters, is a dream.

Pythons advantages are:

Faster startup-time which makes it a good scripting language.

More platforms, there is no Common Lisp on Nokia phones.

Some clever details, like using minus to index vectors from the right.
(aref "hello" -1) gives an error on Lisp, but the character o on
Python.

Another detail I like is that you can choose how to quote strings, in
Python you can write three double-quotes to start a string that can
include anything, quotes, doublequotes and newlines.
You can use double-quote if you want to embed single-quotes "john's" or
single-quote if you want to embed double-quotes '<id="2">'.

Talking about Lisps advantages will take me too long.

/hankhero, a switcher.
 
F

Fredrik Lundh

Carl said:
Consumer choice can never be boiled down to one thing; there are so
many factors. No one knows the whole answer. I certainly don't.

it's all due to Python's humongous marketing budget, of course. just
imagine what would have happened if someone had spent that much VC money
on Lisp.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top