Why lisp?

Started by
103 comments, last by Vlion 20 years, 2 months ago
quote:Original post by Predictor
Would being more intelligent be an advantage in any language? Why is this an advantage specific to Lisp?
Because if an average programmer used Lisp, he wouldn''t get the benefits out of it and he''d be better off using some mainstream language with their set of well defined, pre-made features. The usage of Lisp isn''t justifiable unless one is capable of thinking differently than the norm.

Of course it''s sort of like in any language. An average C++/Lisp programmer writes average C++/Lisp code. A good C++/Lisp programmer writes good C++/Lisp code. Average C++/Lisp code are comparable: They just use some given features, probably not even close to their full extent. So Lisp wouldn''t be a good choice because C++ is better supported and more popular. But good C++/Lisp code aren''t comparable. In C++, the good programmer will hit the roof and be unable to formulate a better abstraction with the language. With Lisp, there''s no such roof, so the good programmer is set free, to explore whatever in her interest.
Advertisement
quote:Original post by Predictor
Others here, though, seem to be aserting that Lisp can take over the function of all other languages due to its extensibility.

Reminds me of the Java crowd who pretend (and some of them even seem to believe) that the whole world runs on 100% Java.
quote:Original post by Anonymous Poster
It sounds as credible as a C programmer saying "I don''t see how OO would provide a general advantage".

But when OO proponents argue for OO they provide examples that show clear benefits over traditional approach. Lisp proponents provide a set of abstract arguments that are meaningless to a Lisp novice. Essentially I am offered to invest a few years of my time (since apparently it takes quite a while to actually *see* the advantages of Lisp) without seeing clear examples of how Lisp would be advantageous to *my* particular task. Now, if you were in my shoes, how would you respond?
quote:Original post by CoffeeMug
Essentially I am offered to invest a few years of my time (since apparently it takes quite a while to actually *see* the advantages of Lisp) without seeing clear examples of how Lisp would be advantageous to *my* particular task. Now, if you were in my shoes, how would you respond?
You don''t actually have to *do* it all first to *understand* why doing it would be good. Reading On Lisp[1], an effort that shouldn''t take too long even for a Lisp novice, will be enough to give you an idea of the possibilies that will be available to you when you use Lisp. It''s then up to you to evaluate whether you think you could use Lisp in such a way that it would be advantageous to you. If you believe that you can''t, then Lisp is probably not the language for you, and I have no reason to try to convince you. But getting to the point where it''s possible to understand the power of Lisp, and what it can give you, won''t take long.


[1] http://www.paulgraham.com/onlisp.html (it''s free)
quote:Original post by Predictor
Knowing that Lisp cannot possibly be better than all other tools under every circumstance


quote:Original post by Anonymous Poster
What do you know? Lisp can be pretty close under every circumstance, if not better.


I want to make sure I understand the meaning of that statement perfectly: Are you suggesting that Lisp is better than any other tool, for every type of programming?

-Predictor
http://will.dwinnell.com





[edited by - Predictor on February 23, 2004 5:04:59 AM]
quote:Original post by Predictor
I want to make sure I understand the meaning of that statement perfectly: Are you suggesting that Lisp is better than any other tool, for every type of programming?
Ok, even though I didn''t say that, even what I said was too bold because I was only thinking of the task of writing the code, not so much the resources used or where Lisp compilers would even be available. I wouldn''t use Lisp for very low level code, on microcontrollers <wink> or tiny embedded systems (although some Lisp dialect could easily accompany Java on mobile phones) or on toy projects where I don''t plan to spend much time but which are well covered in other languages through existing libraries. But if I think of the domains where Java, C#, perhaps C++ (unless only used for low-level code), Prolog and many others are generally used in real work, Lisp would hold a definite advantage. My crude questimate is that 3/4 of programming tasks are best suited for Lisp, assuming good programmers.

Naughty Dog, the creators of Crash Bandicoot series and Jak and Daxter, even went so far to create their own Lisp compiler to best suit PlayStation 2 and to compile their own dialect. So they must''ve thought they can get a real advantage that way, considering how much work it must be to write the compiler. And considering how successful their games are, they must''ve really got those advantages they were dreaming of when they chose Lisp.
Another book of interest is Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp[1] by Dr. Peter Norvig (Currently head of search quality at google).

Many of the possibilities discussed in this thread are described in this tome. e.g. Writing a prolog compiler (Chapter 12), compiling into other languages (usually asm or bytecode -but it doesn't have to be)(Chapter 23). The source code from the book is available here.

gl hf

[1] If you buy it from a link, maybe a webmaster at this site could hook you up with the link that gives them commission.

[edited by - flangazor on February 23, 2004 7:48:48 AM]
quote:Original post by CoffeeMug
But when OO proponents argue for OO they provide examples that show clear benefits over traditional approach.

There are many Lisp examples floating around the 'net (including these forums). The problem is that examples have to be verified first-hand through personal experience. Without that, all that can be gathered is a bunch of factoids disembodied from the actual experience which gave rise to the conclusion. This bunch of factoids may be of use to parrotts, but of little use of someone trying to understand the implications of the technology in question.
quote:
Lisp proponents provide a set of abstract arguments that are meaningless to a Lisp novice.

Of course. An abstraction is supposed to provide a memoisation which conjures up the full meaning of the abstraction. Without having been through the experience which imparts that full meaning, all that remains is, by definition, abstract.
quote:
Essentially I am offered to invest a few years of my time (since apparently it takes quite a while to actually *see* the advantages of Lisp)

How long it takes depends upon you and what knowledge you already have. Many programs written in languages other than Lisp actually end up simulating facilities of Lisp. It is quite possible that a non-Lisper is already `thinking in Lisp' without realising it.
quote:
Now, if you were in my shoes, how would you respond?

I would seek to gain a body of experience which allows me to make the connections between disembodied factoids and the rationale which led to them. I would then evaluate the factoids for myself.


[edited by - SabreMan on February 23, 2004 9:10:09 AM]
I''ll be putting this theory to the test here

Having read this thread, I recalled some moments during the development of a bot that I have been developing. I have started from scratch about 10 different times, in various languages, because no language seemed right for the job. C++ was obviously the more efficient of the bunch, but the extensibility of the project relied on robust runtime type information that is not so intuitive in C++. Java and C# appeared to be better suited in this regard, but the performance hits were too much when the information database grew beyond 100,000 or so entries. I was able to cut down on the performance problems in C# much better than in Java, but it posed a problem in portability, where it was desirable to run the application on Unix/Linux servers which are what is mostly available in academia. I understand there are some C# implementations cropping up in *nix, but the consensus seems to be that they are not ready for any serious dev yet.

So I guess I''ll see just how useful Lisp really is. This is a case where I would want to define my own object model, which many Lisp proponents seem to think is a major advantage of Lisp. The project data is entirely XML-based, which is another area that proponents have harped on. In fact, ideally, I would want tight integration of the object model and XML schema, as XML should be able to fully define the structure and interface of the objects. It would also be great to integrate scripting within the XML elements in an XML-friendly manner. This was done previously using &#106avascript libraries, but &#106avascript is not particularly well suited for the problem domain.<br><br>If Lisp is as useful for implementing these types of things as people make it out to be, I will join them in their Lispdom. Of course, I get the impression that if it doesn''t turn out to be so useful, I will merely be branded an incompetent. That is of little importance, however. So I shall let you know how it turns out <img src="wink.gif" width=15 height=15 align=middle><br><br>Peace
quote:SabreMan said:
There are many Lisp examples floating around the 'net (including these forums). The problem is that examples have to be verified first-hand through personal experience. Without that, all that can be gathered is a bunch of factoids disembodied from the actual experience which gave rise to the conclusion. This bunch of factoids may be of use to parrotts, but of little use of someone trying to understand the implications of the technology in question.

quote:SabreMan also said:
In a reasonable debate, you should not expect your co-debaters to go digging around for `evidence' that you insist exists. If you want to communicate your ideas to people, then you will find people are more willing to listen if you make it easy for them. Without doing that, you appear very much like a zealot.


Is this a discrepency?

[edited by - flangazor on February 23, 2004 9:30:47 AM]
quote:Original post by Krippy2k
This is a case where I would want to define my own object model, which many Lisp proponents seem to think is a major advantage of Lisp.
I don''t really think of actually doing that as an especially important advantage. The fact that you can, and then use that power to do useful stuff, is the advantage. It''s good to stay with existing solutions if the existing solutions aren''t very lacking. I suggest you first take a look at CLOS. It''s a bit different from the object system you''re used to from a C++/Java background.

And read On Lisp before you start <wink>

This topic is closed to new replies.

Advertisement