473,800 Members | 2,385 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 28774
Steven D'Aprano wrote:
>
But I also gained a little more insight into why Lispers love their
language. I've learnt that well-written Lisp code isn't as hard to read as
I remembered, so I'd just like to withdraw a comment I made early in the
piece. I no longer believe that Lisp is especially strange compared to
natural languages.

Anyway, real life catches up on me, and so I must drop out of this thread.
May it not last for ever.
And I have heard why Pythonistas like their language. They can get things
accomplished in it. The best positive feedback is success. You can get
lost in theoretical, metaphorical discussions about computer languages.
It is frustrating and in many cases pointless.

As for why you have seen conflicting answers and, yes, sometimes hostile
responses. I have no idea. But, I think I have come to a point in my
life where I do not need to be right.

W
Dec 10 '06 #331
Steven D'Aprano <st***@REMOVE.T HIS.cybersource .com.auwrites:
Which just proves my point. If people don't share the same language
constructs, the same words, the same grammar, etc, they can't
understand each other.
Yes, but that depends *much* more on social background, habits,
experience than on technical details like correct syntax, orthography
etc. Do you know about studies with texts where the letters of each
word are disordered except the first and the last and nearly everyone
was able to read this (OK, it took a little bit more time, but it was
readable)? So much to the importance of syntax and orthography.

Essentially every group of people, scene, community has it's own
special language and if you want to communicate with them, you have to
learn this language. Excatly the same goes for software projects with
their libraries -- completley independet of the technical background
of the abstractions (functions, classes, macros,...) the libraries
provide.

It's really funny to see how you try to create and defend a purely
factitious line between abstraction techniques like functions,
classes, and even operator overloading and shadowing on the one side
and those big bad macro monsters on the other side.

--
Stefan.
Dec 10 '06 #332
JS******@gmail. com skrev:
>
The reason has little to do with macros (although
they were very helpful, of course, esp. in making Tcl look like a
reasonable language so that we could use Tk)
How long ago was this? ;-)

[Macros in Python]
Either people will not use them, and they will languish and die, and then
at least you can say; "Been there, done that" to the Lisp community.
Well, someone did write Logix probably with the intention of getting
interest from the community:

http://livelogix.net/logix/

It's already been noted what the response has been.
Or, more likely, the some subset of the Python community will get it,
and will figure out how useful they are, although it might take some time.
I've been interested in macros for Python, and you'll find other people
with similar views:

http://www.fiber-space.de/EasyExtend/doc/EE.html

That said, you'll find the discussion about macros to be quite open,
occasionally even on the Python development lists. But it is also
important to note that the development and usage of Python is not
guided from purely technical motivations (or from technically pure
motivations), and the heated discussion about natural language
analogies reveals that just as people are content to form communities
around certain kinds of literature, so are people interested in forming
communities around developing certain kinds of systems.

[...]
you will probably be able to maintain and improve your flagging
position wrt Ruby (which, according to Matz, is more-or-less just Lisp
w/o macros.)
I think this would be a fairly weak argument for what would otherwise
be a reasonable suggestion. "Come over to my way of thinking or be
destroyed" sounds like something the Emperor would say to Luke
Skywalker. And we all know how that ended. ;-)

And on the subject of remarks about Python developers somehow being
remote controlled by the BDFL, I think that anyone who takes a closer
look will see varying levels of dissent and dissatisfaction , just as
you'd find in any community. Again, many more issues must be considered
to understand why people keep using Python (or alternatively stop using
it).

Paul

Dec 10 '06 #333
In article
<pa************ *************** *@REMOVE.THIS.c ybersource.com. au>,
Steven D'Aprano <st***@REMOVE.T HIS.cybersource .com.auwrote:
On Sun, 10 Dec 2006 14:35:07 +0000, Kirk Sluder wrote:
In article
<pa************ *************** *@REMOVE.THIS.c ybersource.com. au>,
Steven D'Aprano <st***@REMOVE.T HIS.cybersource .com.auwrote:
And here I was thinking that languages fell from the sky like donuts!
Gosh, thank you for explaining that too me. What a fool I must seem!
Certainly that is what you wrote. If you had not meant that English
enforces restrictions on expressiveness, perhaps you should not have
written it.

Okay, I'm trying to meet a common ground here, but you're not making it
easy. Of course English, like all languages, restricts what can be said in
that language. I'm talking about grammar and syntax, not semantics, just
like I said at the beginning.
Well again, the question is exactly *what* is doing the restricting?
What will happen if you make an "illegal" statement in English? If
you can't define some sort of mechanism inherent in the English
language that prevents the expression of "illegal" utterances, then
you can't make the claim that "English. .. restricts what can be
said in that language." This is a technical point, but not a
trivial one. That is one heck of an active verb that you are
attributing to an extremely passive noun.

If you want common ground, it appears that we both agree that
language practices are enforced by social communities. Is this not
the case?
Oh, you might also like to look up what a straw-man argument is before
continuing to accuse people of making it. There seems to be this myth on
the Internet and Usenet that a straw-man argument is "any argument I don't
like, or don't understand, or can't refute".
Certainly. A straw man is an artificially weak position that you
attribute to your opponent. You chose to argue against the
artificially weak position of "there are no rules." You attributed
that position to me, not acknowledging my stated position. In what
way is this not a straw man?

You now claim to agree with the position I actually stated: language
is restricted by social communities that use language. If we both
agree on this position, we can move on back to the discussion on how
those norms and practices discriminate against unlispy/unpythonic
language extensions.
That might be true in the case of public code which is open to the entire
community, but it isn't true of all code. Not all code is open to the
wider programmer community to inspect. Code gets written in small teams,
or by individuals, and then it gets used by potentially millions of people
who never got to review the code but have to suffer the consequences of
any bugs in it.
What do people who don't need to read code, or don't need access to
code matter in regards to code readability?

And yes, small teams do constitute a linguistic community of
practice as well. But I don't know of many small teams who don't
have histories as members of larger communities of practice.
(I'm not saying this is uniquely a problem caused by Lisp macros. Don't
misinterpret what I'm saying.)
Which comes back around again to my constant question. Why do these
threads consider macros as a way to extend the language so much more
of an obfuscatory threat compared to other methods of language
extension: (including libraries, operator overloading, and
polymorphism?)
Dec 10 '06 #334
Steven D'Aprano <st***@REMOVE.T HIS.cybersource .com.auwrites:
You know, I'm really starting to think that you Lispers -- and I hate to
generalise, but in this case I feel I'm forced to -- have a real problem
You feel you're forced to generalize about an entire group of language
users based on what a handful of people have posted on a newsgroup?
So which is it? If Lisp is so self-evidently better than every other
language, and if nobody has any fears or concerns with Lisp, why is Lisp a
fringe language? Not as fringe as it was ten years ago, and maybe growing
in popularity, and it is beyond all doubt that Lisp has a lot of influence
amongst language designers, but outside of a few niche areas, its still a
fringe language.
I'd like to know the answer. But the problem most people cite is the
parentheses, not the fear that someone will abuse macros. I have
certainly never seen anyone as worried about macros as you seem to be.
>>My point isn't whether or not their claims are correct (a "couple" of
macros? really?) but that things like this feed the perception that Lisp
is close to that hypothetical language where anything could be anything.
If anything could be anything, do you really know what (+ 1 2) means
without reading every line of code?

Jesus H Christ. Didn't you just get through talking about how easily
someone can redefine built-ins in Python?

Yes. But you can't redefine 1+2 in Python, at least not without hacking
the interpreter. Can you redefine (+ 1 2) in Lisp?
Yes. Can't you redefine standard functions in Python?

Frank Buss correctly points out that you can shadow the + symbol and
make it whatever you'd like it to be. This is true, but now someone
has to intentionally and specifically import the package containing
that shadowed + into their own package. You are never unwittingly
using a different + than the standard CL one, although you really seem
to want this to be the case.
>>(This is an interesting demonstration that any language that allows file
I/O and importing of external program files can always treat functions
as data, even if the language doesn't directly support it. An alternative
would be to keep the strings in memory instead of writing to a module,
then use exec on them instead of importing the module.)

No, it treats code as text. See the difference?

Text is data.

What is the point of your comment? You don't have to argue about every
thing I say, even the ones we agree on. Look again at what I wrote. Is
there anything that gave you the impression that I think that having the
ability to write text to a file and import it is better than actually
supporting functional programming directly?
Well, text is not code. Text is a syntaxful representation of the
actual code, which is an AST. If I have a string full of text, I
can't do very much meaningful work with it. On the other hand, if I
have an AST, I can transform it or analyze it however I choose.
>Could you calm down?

Okay, once was funny. Twice is worrying. What exactly is giving you the
idea I need to calm down? Was it the use of reasoning and logic?
Perhaps it was the attempt to be reasonable and moderate and find some
middle ground that we could agree on, or if not agree, at least say "Well,
I disagree with you, but at least I understand where you are coming from"?
Where I'm coming from? Dude, you're writing paragraph upon paragraph
about the same thing, multiple times per day. You're terrified of
worst-case scenarios that everyone else is telling you are not
realistic.
Dec 10 '06 #335
Steven D'Aprano wrote:
>
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?

steven, you bring back awful memories :( in my college days, we had already
learned fortran, pascal, c, snobol, prolog and some assembly. then we took
a lisp class. what a complete nightmare!!! except for that one brainiac
kid who was on "another planet", the rest of the class (about 30 people)
could not grasp lisp at all. the teacher was always pissed off. he kept
telling us it was such an easy language and it's so powerful and kept
saying our lisp code looked like pascal. so, for the final he
intentionally gave us problems that if you don't think in a lisp way you
couldn't solve the problem within the time given. of course everyone
failed or got a D. my point is i know at least 30 people that could code
in other languages just fine, but not lisp. i've tried to learn it on my
own several times since then, but it's just too difficult for me. my brain
just doesn't work that way i guess. with python, my brain doesn't hurt. i
can program in a very relaxed way and it seems that whatever i'm thinking,
i can just write it naturally in python. for me personally that's how i
define "expressiveness " eventhough others here would disagree on
what "expressiveness " means.
bryan
Dec 10 '06 #336
Bill Atkins <at****@rpi.edu writes:
>Yes. But you can't redefine 1+2 in Python, at least not without hacking
the interpreter. Can you redefine (+ 1 2) in Lisp?

Yes. Can't you redefine standard functions in Python?

Frank Buss correctly points out that you can shadow the + symbol and
make it whatever you'd like it to be.
Well, there is no "THE + symbol", there are a lot of different symbols
named "+". The one you get when you read the characters of "(+ 1 2)"
depends on the dynamic binding of the COMMON-LISP:*PACKAGE* symbol.

This is true, but now someone
has to intentionally and specifically import the package containing
that shadowed + into their own package. You are never unwittingly
using a different + than the standard CL one, although you really seem
to want this to be the case.
The Common Lisp standard has no provision to and indeed forbid to
modify the function binding of the COMMON-LISP:+ symbol.

On the other hand, implementations may allow, sometimes with the help
of an implementation specific WITHOUT-PACKAGE-LOCK operator, to change
the function binding of the COMMON-LISP:+ symbol.

So, while the standard preserves itself, and wants you to explicitely
say you're using a symbol named "+" from a different package than
COMMON-LISP, rather than modifying CL:+, the implementations may still
allow you to actually modify the COMMON-LISP package, but of course,
this may not be Common Lisp anymore, if you don't follow the
specifications of Common Lisp (and if you do, why are you trying to
modify CL:+ that already implements Common Lisp!?).
--
__Pascal Bourguignon__ http://www.informatimago.com/

This universe shipped by weight, not volume. Some expansion may have
occurred during shipment.
Dec 10 '06 #337
Pascal Bourguignon <pj*@informatim ago.comwrites:
>This is true, but now someone
has to intentionally and specifically import the package containing
that shadowed + into their own package. You are never unwittingly
using a different + than the standard CL one, although you really seem
to want this to be the case.

The Common Lisp standard has no provision to and indeed forbid to
modify the function binding of the COMMON-LISP:+ symbol.
I'm not talking about redefining the + symbol; I'm talking about
shadowing it and defining a new function on a different symbol that
has the same symbol-name.
Dec 10 '06 #338
Paul Boddie schrieb:
Given that the meaning of import doesn't need to have changed to bring
out the described consequences, I guess anyone wanting to know more
won't be asking you specifically.
I should have added some lines:

==== python =============== =====
>>import a
import b
You sucker thought I'd import b for you.
Instead I'm going to erase your hard drive.
>>a
<module 'a' from 'a.pyc'>
>>b
=============== ===============

I was suprised that b was defined at all.

Dec 10 '06 #339
Steven D'Aprano wrote:
I'd love to say it has been fun, but it has been more frustrating than
enjoyable. I don't mind an honest disagreement between people who
genuinely are trying to see the other's point of view, but I don't think
that was the case here. What was especially frustrating was that the more
I tried to understand certain Lispers' positions by asking questions, the
more nasty and insulting they became. So now I have an even better
understanding for why Lispers have a reputation for being difficult and
arrogant.
This is only because they openly disagree with your beliefs. Note that
you appear the same way to your Lisp-using flamewarrior counterparts.

We might look in the mirror:
<http://www.escapefromc ubiclenation.co m/get_a_life_blog/2006/04/how_the_technog .html>

Maybe Lisp users are singled out as particularly arrogant because they
claim that the last 20 or so years of the software profession have been
something of a fraud.
Tayssir

Dec 10 '06 #340

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

Similar topics

14
2194
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
9551
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
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
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
10033
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
9085
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
7576
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
6811
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
5471
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...
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.