473,750 Members | 2,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

merits of Lisp vs Python

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

Dec 8 '06
852 28568
On Sat, 09 Dec 2006 22:04:04 +0100, mystilleef <my********@gma il.com>
wrote:
Bill Atkins wrote:
>Are any of these not subjective?

Objectivity is in the eye of the beholder.
>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.
You are just being silly.
Lisp's OO environment CLOS is vastly superior to Python classes.
Both in terms of expressive power and flexibility.
You might even find out if you ever learnt how to use it.

Lisp also supports procedural programming just fine.

In the windows world the best way to access system libraries are
via .NET. Thus each language inventing it's own libraries is quickly
becoming
a thing of the past. Also you can mix and match languages according to
need.
Python is fine if you approach programming as Lego, simply gluing together
libraries.
But if you want to do some serious algorithmic's you may find that it is
just to slow.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Dec 9 '06 #171

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
They are both a lot of fun.

Python is a clean, focused language that never was designed to replace
every programming language out there or solve all of the world's
problems.

Lisp is an entire world in itself.

Dec 9 '06 #172
"mystilleef " <my********@gma il.comwrites:
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,
documentatio n, 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.
Dec 9 '06 #173
John Thingstad wrote:
You are just being silly.
Lisp's OO environment CLOS is vastly superior to Python classes.
Both in terms of expressive power and flexibility.
You might even find out if you ever learnt how to use it.
Donkeys have wings.
In the windows world the best way to access system libraries are
via .NET. Thus each language inventing it's own libraries is quickly
becoming
You're only proving my point. Why do you think most windows developers
use .NET?
Python is fine if you approach programming as Lego, simply gluing together
libraries.
You mean it's fine for what 90% of programmers do?
But if you want to do some serious algorithmic's you may find that it is
just to slow.
Slow for users who aren't familiar with Psyco, Pyrex and C extensions,
sure.

Dec 9 '06 #174
Steven D'Aprano wrote:
But Lisp's syntax is so unlike most written natural languages that that it
is a whole different story.
Bahaha!
Yes, the human brain is amazingly flexible,
and people can learn extremely complex syntax and grammars (especially if
they start young enough) so I'm not surprised that there are thousands,
maybe tens or even hundreds of thousands of Lisp developers who find the
language perfectly readable.
1'(especially if they start young enough)
(ESPECIALLY IF THEY START YOUNG ENOUGH)
2(sixth *)
ENOUGH

.... said!

Yeah, so /unlike/ written natural languages!

What a fucking moron.

Dec 9 '06 #175
In article <87************ @thalassa.infor matimago.com>,
Pascal Bourguignon <pj*@informatim ago.comwrote:
Kirk Sluder <ki**@nospam.jo bsluder.netwrit es:
I've not seen a convincing explanation as to why imported macros
from some library are so much more evil than imported functions. In
both cases one might have to dig into documentation and/or comments
to understand exactly what that imported snippit is doing.

And the difference with a library function is?

(defpackage "LIBRARY" (:export "THIS-IS-A-FUNCTION"))

(library:this-is-a-function ???) ; ???
Well, my argument is that there is little difference. Functions,
objects and macros all redefine some aspect of the system's
language, and all of them can be vulnerable to obfuscation or
unnecessary abstraction. The question I have is why do critics
single out macros and not other forms of abstraction such as
objects, packages, libraries, and functions?

just as an example:
from foolib import *
bar.bar("somefi le")

What does this program do? I have no idea. Its functionality is
hidden behind multiple layers of abstraction (function, object,
library.)
Dec 9 '06 #176


mystilleef wrote:
Bill Atkins wrote:
>>Are any of these not subjective?


Objectivity is in the eye of the beholder.

>>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.
But CLOS is the best OO there is. The OMG said so. It can do anything
any other OO can do. Why /specifically/ would you not use it? This type
of thread has no educational value unless one is specific; we already
know what the posters like and prefer, so the only added value comes
from being specific about language details. And funny put-downs. :)
>
>>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.
Hopefully, because any sizeable app will have its sum functionality
compartmentaliz ed into internal little sub-APIs. These five/ten data
structures and functions have been created to handle this recurring
problem faced by higher-order functions. Sometimes dealing with that API
requires boilerplate code to be written. Set things up. Make a call.
Check the return status for xyz. etc etc. That boilerplate can become a
macro, such as WITHOUT-C-DEPENDENCY:

(defmacro without-c-dependency (&body body)
`(let (*call-stack*) ,@body))

*CALL-STACK* is internal to Cells and should not be exposed. It is cool
that all I need do to defeat the entire Cells engine is bind one special
variable, but maybe someday that will get hairier. if so, no problem, I
just change the macro. Btw, without special variables, you would need:

(let ((save-stack *call-stack*)
(setf *call-stack* nil)
<your code here, possibly trapping errors>
(setf *call-stack* save-stack))

If you want to use a function instead of a macro and still hide the
boilerplate, it would have to be:

(without-c-dependency (lambda () <your-code-here>))

Not the end of the world and at least one Lisp legend thinks that makes
macros unnecessary.

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.
You and GvR are thinking of the case where a macro is used to create a
whole new syntax, like LOOP (a mildly controversial part of standard
Lisp). I have written more macros than you can imagine and only once
even came close to it (but the language was just a list of things to do,
nothing incomprehensibl e). I have never seen a macro which introduced a
new language.

Of course, we all keep saying this and you all keep repeating the
opposite, so we do appreciate the excuse to repeatedly explain how
macros are really used. :)
The benefits of extending a language in a domain specific
manner are exaggerated.
Careful, there are laws now against cruelty to straw men.
My observation is that macros are important to
Lisp and it's derivative because they lack libraries to begin with.
Damn! Exactly which macro would have saved me creating bindings to
OpenGL? (I think you have a little category error going here.)
Common problems solved using macros in Lisp and friends are solved
using specialized libraries in most other languages.
Damn! Exactly which macro would have saved me creating bindings to
OpenGL? (I think you have a little category error going here.)
And I like the
specialized libraries route.
Damn! Exactly which macro would have saved me creating bindings to
OpenGL? (I think you have a little category error going here.)
Meta-programming just doesn't tickle my
fancy. It just spells maintainance nightmare.
The whole idea of meta-programming is reducing coding and simplifying
maintenance, so I have to wonder how much experience you have writing
macros. Could you post a few?

Macros come into play when we find a pattern in out code that is a level
more abstract than straight token replacement (ala C) will support. My
simple example above is just about avoiding typing LAMBDA, which I hate.
:) More interesting macros take a look at the input source to the acro
invocation and, instead of subsituting in a fixed template as does the C
preprocessor, actively assembles template bits and input bits to produce
the final result.

Of course one has to be clever enough to see higher-order patterns and
appreciate the vast productivity increase available in return for the
effort of thinking through a macro -- well, i should note that often I
do not create the macro until I see also that this bit of internal API
will be coming up often enough (or will be changing often enough as I
come to understand it) to make the effort of carving out a macro
worthwhile -- or, yes, the point of macros will be lost on you.

That's OK. I once knew a guy who cut and pasted code to create tens of
duplicates rather than create a function. He was not stupid, but clearly
there was something wrong upstairs. I think to him it was somehow
"simpler" than getting involved with these complicated function things.

Sound familiar? :)
>>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.
How would that be a bad thing? Do you do a lot of programming without a
Python environment. But I love the wall of flak you are throwing up. :)

>
>>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.
<cough>
More
people would be writing Lisp libraries if it was worthwhile.
We are, now that a few application programmers have landed on her
shores. Most Lispniks are just useless groupie wannabes coding Java all
day to pay the bills with no energy for programming when they get home.
Apparently, it doesn't seem to be. A few years ago, I tried to write an
editor is Scheme. The experience was appalling.
Damn. I wish this was the quarterly Lisp vs Scheme flamewar.
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.
You seem to be the unhappy one. We are just here correcting FUD. We are
ecstatic with Lisp and would not want anyone to miss out on it because
of your misnformation. No one cares if you try it and decide against or
do not try it based on good information.

But for someone to miss out on Lisp because of your deliberate
misrepresentati on would be a shame.

ken
--
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
Dec 9 '06 #177
"No programmer who learned Lisp ever gave up before he learned Lisp."That would be the obvious retort, but my observation was empirical, so I
am afraid you need numbers, not word games.

You seem awfully hostile, by the way. Won't that make it harder to
conduct an intelligent exchange of value to lurkers?
I wonder, how many people gave up trying to learn Lisp because the
language was too hard for them to read? Anyone like to bet that the number
was more than zero?Sorry, no one ever discovered Lisp, decided it would be great for
programming, started learning it and then gave up because they could not
handle the syntax.


Uh. Clearly no one would be dumb enough to admit it in front of the
entire usenet world, right?

- Mr. NoOne
P.S. I am still going to get back to it when I get some time, really.
LISP seems intriguing and superior, almost a magical Rubik's cube
waiting for me. I just stumbled across Python in the meantime and code
started flowing - I got distracted. I have CL (& Scheme) on all my
machines awaiting my focus.... I'll join the flock any day now. :-)
I've just been busy. There is a cost to learning and I've not had the
spare change to date.

But New Years resolutions need to be made: I could get up a couple
hours early and spend some quality time with CL, do a daily hour jog,
and eat a really heathly breakfast. Writing myself a note on this.
P.P.S. Undoubtedly not learning a syntax either means not enough time
was put in or the student lacked proper intelligence. This will always
bias the significance of learning syntax as a factor in choice of
language to be under reported. cheers

Dec 9 '06 #178

JS******@gmail. com wrote:
Carl Banks wrote:
JS******@gmail. com wrote:
Okay, since everyone ignored the FAQ, I guess I can too...
[snip]
What Python has is stupid slogans
("It fits your brain." "Only one way to do things.") and an infinite
community of flies that, for some inexplicable reason, believe these
stupid slogns.
IOW, you posted the FAQ so you could appear to have highest moral
ground, then you ignore your own advice and promptly head to the very
lowest ground with ad hominem insults.

You're right, in part: My implicitly linking Python's pros or cons with
its stupid marketing hype is, I think, an ad hominem argument.
Ahem. Calling Python programmers "flies".
But I
don't see a moral issue here; the purpose of posting the FAQ was merely
to try to stop the fight. It failed.
GMAB. If you were really interested in not fighting you would have
shut up.

Regardless, there was some content in my post which you have not
addressed:

To wit:

1. Lisp is the only industrial strength language with pure
compositionalit y, and that this makes it suprior to Python. We don't
have to debate this because it's being debated elsewhere in this
thread.

2. Ruby, which is closer to Lisp than Python, is beginning to eat
Python's lunch. We don't have to debate this either because George has
kindly gave support to it through posting a survey that made this point
quite nicely; Thanks, George! :-)

BTW, for the record, I don't have anything particularly against Python
aside from its stupid marketing hype and a bit of jealousy over those
flies building libraries which I wish we had in Lisp. I've made the
choice uncountable times between PERL, Python, and Tcl when I didn't
have Lisp as an option, and I have always chosen Python in these cases,
even though I can program in any of these. (Although I'm probably going
to start using Ruby instead of Python in these cases, but I'm not
really expert in it yet.)

(Actually, in many cases I can get away with Emacs keyboard macros
where others would program in PERL or Python, although not always.)
Whatever, fanboy.

Carl Banks

Dec 9 '06 #179
On Sat, 09 Dec 2006 22:49:59 +0100, mystilleef <my********@gma il.com
wrote:
>
Donkeys have wings.
? You attitude towards CLOS is obviously insane.
>In the windows world the best way to access system libraries are
via .NET. Thus each language inventing it's own libraries is quickly
becoming

You're only proving my point. Why do you think most windows developers
use .NET?
Lisp can also use .NET. .NET =/= C#
>Python is fine if you approach programming as Lego, simply gluing
together
libraries.

You mean it's fine for what 90% of programmers do?
Yes CRUD (Create, Read Update, Delete)..
Sure you can do that in any languge..
Not sure I would call it programming.
>But if you want to do some serious algorithmic's you may find that itis
just to slow.

Slow for users who aren't familiar with Psyco, Pyrex and C extensions,
sure.
Even then..

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Dec 9 '06 #180

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2181
by: Paddy3118 | last post by:
This month there was/is a 1000+ long thread called: "merits of Lisp vs Python" In comp.lang.lisp. If you followed even parts of the thread, AND previously used only one of the languages AND (and this is the crucial bit), were persuaded to have a more positive view of the other language; (deep breath, this is a long, as well as grammatically incorrect sentence), THEN WHY NOT POST ON WHAT ARGUMENTS PERSUADED YOU.
0
8839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9345
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9257
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8265
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6811
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4716
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.