What is so great about Lisp?
I've been programming in C/C++ for a while, and I've noticed some limitations of the language as have many of the other members of this board. Many of those posters seem to worship Lisp as the perfect language, so I decided to check out some of the links and read some tutorials etc to figure out what is so great about Lisp.
I haven't noticed anything special about Lisp to set it above the other languages. The syntax seems to be defined to be easy to parse (in fact, the syntax appears to be a text representation of a parse tree), but other than that it doesn't seem to be too different from any of the other several languages I've used.
Could somebody explain what makes Lisp so great?
Edit: Links that are somehow Lisp-related:
http://www.paulgraham.com/diff.html
http://www.lisp.org/
http://store4.yimg.com/I/demotivators_1715_12018556
http://www.booksamillion.com/ncom/books?id=2443270818794&pid=0201083191
http://www.lisp.org/table/references.htm#ansi
http://cl-sdl.sourceforge.net/
http://www.franz.com/success/customer_apps/animation_graphics/
http://franz.com
http://lispworks.com
http://clisp.cons.org
http://www.gnu.org/software/gcl/
http://www.franz.com/success/customer_apps/animation_graphics/naughtydog.lhtml
http://www.strout.net/python/pythonvslisp.html
http://www.franz.com/support/documentation/6.0/examples/dll/dll.htm
http://www-2.cs.cmu.edu/~dst/LispBook/
http://www.franz.com/resources/educational_resources/cooper.book.pdf
http://www.lisp.org/table/performance.htm
http://world.std.com/~pitman/PS/Hindsight.html
http://www.lisp.org/table/syntax.htm
http://www.fun-o.com/products/fundev.phtml
[edited by - Extrarius on February 22, 2003 12:26:59 AM]
nothing, but sabreman will for sure come in and fill in a big list.
i don''t like all the fuzz about it. too much overhead it has for me. all possible in runtime means all running in runtime as well.. (sure you can precompile.. but types undefined will often lead to type detection at runtime, something really useless, at least in gamedev)
and the other features don''t sound very useful to me, too.. for scripting stuff, yes. but it sounds really slow to me.
"take a look around" - limp bizkit
www.google.com
i don''t like all the fuzz about it. too much overhead it has for me. all possible in runtime means all running in runtime as well.. (sure you can precompile.. but types undefined will often lead to type detection at runtime, something really useless, at least in gamedev)
and the other features don''t sound very useful to me, too.. for scripting stuff, yes. but it sounds really slow to me.
"take a look around" - limp bizkit
www.google.com
I''d benchmark it before you make any claims that it''s slow.
I haven''t done it myself, but seems like you''re falling victim to a little bit of premature optimization.
I haven''t done it myself, but seems like you''re falling victim to a little bit of premature optimization.
Lots of Irritating Single Parentheses
Oh wait, that doesn''t answer your question, does it?
Oh wait, that doesn''t answer your question, does it?
Closures (first-class functions, anonymous lambda-expressions), continuations, tail-call optimization, and garbage collection come to mind. In C/C++ you spend most of your time figuring out the syntactical means of defining a problem, in Lisp the syntax doesn''t get in the way and you''re always dealing with semantics. You should be careful in comparison C++ to Lisp though as they represent different paradigms. Lisp is primarily functional and dynamically typed whereas C++ is primarily imperative with OO extensions and has a relatively strong type system (well... sort of).
quote:
i don''t like all the fuzz about it. too much overhead it has for me. all possible in runtime means all running in runtime as well.. (sure you can precompile.. but types undefined will often lead to type detection at runtime, something really useless, at least in gamedev)
That''s why you use a type-inferencer.
quote:
and the other features don''t sound very useful to me, too.. for scripting stuff, yes. but it sounds really slow to me.
Slow?
http://www.bagley.org/~doug/shootout/craps.shtml
Common Lisp is only a few points behind C/C++ in terms of speed, and if you adjust the weights to factor in lines of code CL pulls ahead of C/C++. The C/C++ lines of code metric is a joke though because they write things like
int Ack(int M, int N) { return(M ? (Ack(M-1,N ? Ack(M,(N-1)) : 1)) : N+1); }
You''d never do that in real life unelss you wanted to piss someone off.
any useful realworld applications in lisp, including sourcecode, providing proof its useful for real programming, and not scripting?
"take a look around" - limp bizkit
www.google.com
"take a look around" - limp bizkit
www.google.com
quote:Original post by Anonymous PosterTrue, but I don''t think it''s so good that Lisp forces you to write code that''ll piss someone off . I don''t think LOC is a very valid meter anyway. "Explicity" and "Saying things only once" are things I like, but they''re pretty impossible to measure and LOC is just somewhat related to them. If I want my code in a tight packet, I use ZIP.
You''d never do that in real life unelss you wanted to piss someone off.
It''s true that Lisp has some good features compared to the C league of languages. But if I want to use those features, I''ll use Python that has all (?) the good stuff AND a readable syntax. I don''t know if it lacks something important compared to Lisp though.
/personal experiance, your millage may vary
I like to compare LISP to PHP, its easy, its fast, and its very very powerful, BUT it also becomes unmaintanable faster than other languages.(unless you are a good programmer(tm))
The entire language is redefinable at run time, so you can use Classic Algebra for half of the program, then redefine ADD, and use Alternative Algebra instead. OR heck, you can add a bunch of numbers, and then redefine ADD to MULT, and then multiply the same numbers with 1 line of code...
That is its power, That and pattern matching.
davepermen
Emacs, my non-*nix friend...
[edited by - dede on February 3, 2003 6:41:09 PM]
I like to compare LISP to PHP, its easy, its fast, and its very very powerful, BUT it also becomes unmaintanable faster than other languages.(unless you are a good programmer(tm))
The entire language is redefinable at run time, so you can use Classic Algebra for half of the program, then redefine ADD, and use Alternative Algebra instead. OR heck, you can add a bunch of numbers, and then redefine ADD to MULT, and then multiply the same numbers with 1 line of code...
That is its power, That and pattern matching.
davepermen
quote:
any useful realworld applications in lisp, including sourcecode, providing proof its useful for real programming, and not scripting?
Emacs, my non-*nix friend...
[edited by - dede on February 3, 2003 6:41:09 PM]
quote:Original post by Extrarius
I haven't noticed anything special about Lisp to set it above the other languages.
What made Lisp different? The best way to answer your question, of course, is to do your own investigations.
quote:
The syntax seems to be defined to be easy to parse
The syntax is defined based loosely on mathematical concepts, centering around the symbolic expression (s-expression). It just so happens to be easy to parse because...
quote:
[...](in fact, the syntax appears to be a text representation of a parse tree)
Right. Which means that you get to grow your own semantics around that representation, if you so desire.
quote:Original post by davepermen
nothing, but sabreman will for sure come in and fill in a big list.
Your campaign against me is getting predictable aswell as boring. Do change the record.
quote:
i don't like all the fuzz about it.
That's because you don't understand it, and thus feel threatened by it. Why don't you admit it: you're a teenager with no experience of building large systems, and zip experience of Lisp.
quote:
too much overhead it has for me.
Let's see your benchmarks.
quote:
all possible in runtime means all running in runtime as well..
That's a serious logic failure. *Possible* at runtime does not mean it *must* happen at runtime. Let's get this straight: Lisp is a compiled language, and happens to have some interpreters. Just like C.
quote:
(sure you can precompile.. but types undefined will often lead to type detection at runtime, something really useless, at least in gamedev)
It's not useless, unless you happen to think flexibility and expressivity are useless concepts. Note carefully, Lisp allows you to introduce type declarations to optimise code, if that's what you want to do. But, I've told you that before.
quote:Original post by Anonymous Poster
Lots of Irritating Single Parentheses
Lots of Irritating Superfluous Parentheses. Get it right!
quote:Original post by Anonymous Poster
Lisp is primarily functional and dynamically typed whereas C++ is primarily imperative with OO extensions and has a relatively strong type system (well... sort of).
Lisp has an excellent OO model, CLOS. It makes far more sense than C++'s OO model, and this has been discussed in other threads. As for the type system, what does the "relatively" refer to? C++ is commonly regarded as having a fairly weak type-system due to all the escape hatches, although it is stricter than C. Lisp has a strong type-system.
quote:Original post by civguy
[...]if I want to use those features, I'll use Python that has all (?) the good stuff AND a readable syntax.
I thought we'd resolved this recurring criticism about Lisp's syntax. Lisp allows you to evolve your own syntax if that's what you want. Most Lispers don't do that, though, as it's kinda silly. Still, it's good enough to kill the criticism.
quote:
I don't know if it lacks something important compared to Lisp though.
Sure. It lacks uniformity of code and data, and a good macro system. It also lacks the ability to introduce type information, or the ability to specify safety vs. speed trade-offs. It also lacks multimethods.
quote:
any useful realworld applications in lisp, including sourcecode, providing proof its useful for real programming, and not scripting?
The Other Road Ahead, The K2 System and Franz success stories.
[edited by - SabreMan on February 3, 2003 7:05:03 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement