473,800 Members | 2,406 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
In <7x************ @ruckus.brouhah a.com>, Paul Rubin wrote:
Marc 'BlackJack' Rintsch <bj****@gmx.net writes:
>FYI: Here's how Nemerle does macros: http://nemerle.org/Macros

I guess you can't really transform Nemerle into a completely different
language, but it is at least interesting to see such a feature in language
with a more complex syntax than Lisp.

Nobody seems to concerned that Haskell lacks macros. What's up with that?
Hm, right from the Nemerle macro page linked above:

We are following them in the direction of much more powerful, and at the
same time more secure (type-safe) solutions like Haskell Template
Meta-programming.

So there seems to be something macro-like for Haskell.

Ciao,
Marc 'BlackJack' Rintsch
Dec 11 '06 #411
Fred Gilham schrieb:
Paul Rubin <http://ph****@NOSPAM.i nvalidwrites:
>André Thieme <ad************ *************** *@justmail.dewr ites:
>>Instead of function = memoize(functio n)
one could just say: memoize(functio n).
In Python you'd say

@memoize
def function(): ...

But in Lisp you'd write the function, say, "Damn, I need to memoize
this sucker," and evaluate

(memoize 'function)

and the function would be memoized.

I suspect you could even do this "while the program was running" from
something like SLIME. Basically the memoize macro changes the
function cell of the symbol, so from that point all the calls to the
function would be to the memoized version.
You don't even need to say 'function
(memoize function) would be enough.
And yes, you can memoize functions while the program is running.
And you don't need a tool like slime for it. Lisp already offers ways
for doing that.
André
--
Dec 11 '06 #412
André Thieme a écrit :
You don't even need to say 'function
(memoize function) would be enough.
And yes, you can memoize functions while the program is running.
And you don't need a tool like slime for it. Lisp already offers ways
for doing that.
In Python while the program is running :

import module
module.function = memoize(module. function)
Dec 11 '06 #413
Paul Rubin <http://ph****@NOSPAM.i nvalidwrites:
jayessay <no****@foo.com writes:
Maybe not bleeding edge, but more modern than CL in my opinion.
Odd, caml is even older than CL.

You'd have to compare (say) OCaml to CL if it's dialect against
dialect. If you're going to bring in the earlier ML family you also
have to bring in Lisp 1.5, which goes much further back than CL.
Fair enough. But really, I don't see any of these things as
particularly "modern" (whatever that means) or groundbreaking.
Certainly not at this point.

Also, there is the issue of whether there even is a "continual
progression", as in "moving up some ladder" towards something
"better", in the context of programming languages. All of that is
pretty fuzzy stuff, and plenty of CogSci work has shown these value
judgements in this context to be less than obvious in any meaning.

There is also a question about "old/new" wrt these value judgements.
Since Lisp is (admittedly some hand waving here) more or less lambda
calculus embodied, is it closer to say The Calculus or Group Theory
than to some random piece of technology?[1] If Lisp is "old
fashioned", then The Calculus and Group Theory are like _really_ old
fashioned. But does that lessen them in some way? What would that
be? Is some random "new" technique (say brute force iterative
techniques for calculus problems with computers) somehow "better"?
/Jon

1. Of course, the _implementation s_ are random pieces of technology.

--
'j' - a n t h o n y at romeo/charley/november com
Dec 11 '06 #414
"JS******@gmail .com" <JS******@gmail .comwrites:
Kay Schluehr wrote:
is rapidly replacing Perl, and Ruby is simultaneously and even more
rapidly replacing Python.
Really? Given its small base, the percentage increases in Ruby use
(for any reason) can look quite impressive. I've see data suggesting
Ruby is replacing Perl and maybe Java. But I've yet to see data which
shows people dropping Python and moving to Ruby. Where do I find that
data?
--
Harry George
PLM Engineering Architecture
Dec 11 '06 #415
Paul Rubin <http://ph****@NOSPAM.i nvalidwrites:
If you say foo.frob() in Python, that's supposed to look up 'frob' in
a dictionary hanging off of foo. You can modify the contents of this
dictionary any time you want.
Unless I'm missing something this looks absolutely dead easy to
implement in Lisp and with a very little macrology you would have the
syntax as well. I'm not sure how this makes one or the other "more
dynamic".

The Lisp equivalent would be some generic function (frob foo)...
I would say the Lisp equivalent would be to literally do exactly the
same thing. Of course, as you say, maybe doing this doesn't actually
make any sense and so it wouldn't get done...
/Jon

--
'j' - a n t h o n y at romeo/charley/november com
Dec 11 '06 #416
Steven D'Aprano schrieb:
Yes. But you can't redefine 1+2 in Python, at least not without hacking
the interpreter. Can you redefine (+ 1 2) in Lisp?
It is possible as was pointed out.
If anyone would do it, he/she would do it inside a package.
Then you would write:
(package:+ 1 2)

So in real world programs there is no danger.
In Python I could just say
def list():
return 30

and won't get a warning. In Lisp I would at least have to shadow +
explicitely.
In Python it can't happen because + is not a function.
And what do you do if you want to pass + as a HOF?
André
--
Dec 11 '06 #417
mystilleef schrieb:
Ken Tilton wrote:
>Lisp has all the cool qualities you like in your pets, plus native
compilation in most implementations , plus maturity and a standard, plus
a better OO, plus macros, plus a dozen more small wins. Including
automatic indentation. :)

Better OO? You mean the one that doesn't support basic encapsulation
and is retardedly cumbersome to use? There's a reason I said, I'd never
use Lisp for OO not even when I'm high. Gimme Python, Eiffel or
Smalltalk anyday, not the retarded add-on package bolted on CL.
What do you mean with "encapsulat ion" in this context?
I am looking for something that Pythons or Smalltalks OO system have
which isn't in Lisps...
André
--
Dec 11 '06 #418
Harry George ha escrito:
Really? Given its small base, the percentage increases in Ruby use
(for any reason) can look quite impressive. I've see data suggesting
Ruby is replacing Perl and maybe Java. But I've yet to see data which
shows people dropping Python and moving to Ruby. Where do I find that
data?
No _scientific_ data but TIOBE Dec index shows an increase of 9x on
Ruby, 1x for Python and -4x for LISP [1]. More:

"There is only 1 month to go before TIOBE announces its 'programming
language of the year 2006'... Ruby remains to be top favorite for the
title."

Look also to Google Trends [2, 3]. One can notice further increase for
Ruby and slight decreasing for Python.

[1] http://www.tiobe.com/tpci.htm

[2]
http://www.google.com/trends?q=ruby+...o=all&date=all

http://www.google.com/trends?q=ruby+...o=all&date=all

Dec 11 '06 #419


Harry George wrote:
"JS******@gmail .com" <JS******@gmail .comwrites:

>>Kay Schluehr wrote:

>>>is rapidly replacing Perl, and Ruby is simultaneously and even more
rapidly replacing Python.


Really? Given its small base, the percentage increases in Ruby use
(for any reason) can look quite impressive. I've see data suggesting
Ruby is replacing Perl and maybe Java. But I've yet to see data which
shows people dropping Python and moving to Ruby. Where do I find that
data?
You missed it? Google fight:

http://www.googlefight.com/index.php...hon&word2=Ruby

Python wins, 74 to 69.3. And there is no Monty Ruby to help.

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 11 '06 #420

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
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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...
0
10275
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...
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
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...
1
4149
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
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.