Hot answers tagged

76

My undergrad degree was in Cognitive Science and Artificial Intelligence. From that I had a one-course intro to Lisp. I thought the language was interesting (as in "elegant") but didn't really think much of it until I came across Greenspun's Tenth Rule much later: Any sufficiently complicated C or Fortran program contains an ad hoc, ...


71

There are a few reasons I am working on becoming competent with Common Lisp. Homoiconic code. This allows structured self-modifying code. Syntax-aware macros. They allow rewriting of boilerplate code. Pragmatism. Common Lisp is designed to get stuff done by working professionals. Most functional languages aren't, as a rule. Flexibility. It can do a lot of ...


68

In answer to question 2, "Most widely used dialect": Depends on how you interpret "Most widely used." Here are some napkin math for lower bounds on how much use each of a few chosen dialects get. Most raw code written Possibly Scheme (all dialects) because of educational applications 270 schools... Let's guess 50 students/year, 500 lines of ...


59

I rather like Scheme, if you want to work with the JVM you should check out Clojure, which is a lisp that is designed to work in the JVM. And yes Lisp is still worth learning to see how powerful such a minimal design can be! The folks who created lisp got some things really right. Its amazing how many of the cool new features of modern languages lisp had in ...


54

I suggest learning both, Haskell first, then Common Lisp. My experience with Haskell was that the static typing seemed to be a restricting annoyance at first, but once I got used to it, I noticed that most of my type errors had logic errors hiding behind them. When you get to this point, and the next milestone, which is learning to think in types and define ...


53

Expressiveness isn't always a positive language trait in a corporate environment. Java is extremely popular partly because its easy to learn, easy to write, and easy to read. Mediocre programmers can still be very productive in Java, even if their code is wordy and inelegant. Furthermore, it's easy to abuse expressive languages. An expert java programmer ...


43

Is LISP still practiced/used in todays world, or is it a legacy language Yes, it is, but you have to know where to look. People who use LISP don't tend to shout too loudly about it but there's a handful of examples of a few high-profile startups having used it to great effect over the last 20 years. It is also very popular with small companies in ...


33

Well, BASIC had 'LET' for assignment as part of the syntax from the start in 1964, so that would predate the use of 'let' in Lisp, which as Chris Jester-Young points out didn't appear until the 1970s according to Evolution of Lisp. I don't believe COBOL, Fortran, or ALGOL have 'LET' in their syntax either. So I'm going to go with BASIC.


31

I usually don't like pasting a link as an answer, but I wrote a blog article on this very thing. It is not exhaustive, but it gets some of the major points through. http://symbo1ics.com/blog/?p=729 Edit: Here are the principle points: EXISTENCE: Both lisps came after a bunch of other lisps. Scheme took the minimal, axiomatic route. CL took the baroque ...


29

AND please. Haskell teaches you the purest of FP, as far as I'm aware at least, just like Smalltalk teaches the purest of OO. (I mention this not to suggest that OO and FP can't marry, but because both these languages are "gem" languages - a core idea taken to extremes.) Lisp is really a family of languages, so I'll talk about Common Lisp because that's ...


28

Many Lispers will tell you that what makes Lisp special is homoiconicity, which means that the code's syntax is represented using the same data structures as other data. For example, here's a simple function (using Scheme syntax) for calculating the hypotenuse of a right-angled triangle with the given side lengths: (define (hypot x y) (sqrt (+ (square ...


27

Can't really speak for all Lisps but Clojure is definitely a hot and relevant language at present. A London Clojure User Group I went to earlier this week had over 100 attendees.... I've found it to be a very enlightening experience to learn Lisp in the form of Clojure over the past year (after a lot of experience with Java and C#). Main reasons for this ...


26

I'd like to add a theoretical point of view: In classical lambda calculi, let is just syntactic sugar. For example let x = N in M can be rewritten simply as (λx.M)N So its first appearance in early (functional) languages isn't that interesting. However, it become very important with the invention of Hindley-Milner type system and its type inference ...


26

It is very much like learning math will improve your analytic skills and learning latin/classic literature will improve your writing skills. People who designed those languages have thought hard about what does writing a program means. And those languages are the results of those researches. That said, learning Java will also make you a better programmer. ...


24

I recently started a home project using a library that has a C version and a Java version. I wanted to use Lisp for the project, and I spent about a month vacillating between using Common Lisp, Scheme or Clojure. I have some experience with all three, but only toy projects. I'll tell you a bit about my experience with each of them before telling you which ...


23

The AI course I participated in online, taught at Stanford, recommended that Python be used for the homework. I believe Georgia Tech still uses LISP. The fallacy here is "new" is "good". AI research is one of the oldest computing research disciplines. It keeps calving off subfields as people realize that techniques from it can be used elsewhere. Language ...


23

A canonical reference for this type of question is Paul Graham's What Made Lisp Different. The two remaining key features of Lisp that are not widely available, according to this article at the time of its writing, are: 8. A notation for code using trees of symbols. 9. The whole language always available. There is no real distinction between ...


23

A dissenting opinion: Lisp's homoiconicity is far less of a useful thing than most Lisp fans would have you believe. To understand syntactic macros, it's important to understand compilers. The job of a compiler is to turn human-readable code into executable code. From a very high-level perspective, this has two overall phases: parsing and code ...


22

I believe the correct Lisp answer is more gnomic. Something like: "If you have to ask, you are not ready." Then if anyone questions further, the correct answer is either "yes" if it's an either/or question or "You are not ready."


22

One reason Algol-based languages encourage the braces on their own line is to encourage adding more lines in between the delimiting braces without having to move the braces. That is, if one starts out with if (pred) { printf("yes"); } it's easy to come along and add another statement within the braces: if (pred) { printf("yes"); ++yes_votes; } ...


22

I feel your pain, I would love to do more coding in functional programming (Haskell looks so fun!). I feel like I have only just scratched the surface because I have yet to use it in a business context. I would strongly suggest against doing it though. If you program in a language only you know then only you will be able to support it. Unless you want to ...


22

Top-down is a great way to describe things you know, or to re-build things that you've already built. Top-down biggest problem is that quite often simply there is no "top". You will change your mind about what the system should do while developing the system and while exploring the domain. How can be your starting point something that you don't know (i.e. ...


21

One of the key differences between LISP-like languages and other languages is that in LISPs, code and data are the same thing. This makes it possible to do things such as have a program modify some of it's algorithms during runtime as it "learns" new things, as a native part of the language. Another aspect that goes into this, though not as much, is LISP's ...


21

I am the author of IronScheme. I am not really sure how to answer your question, but will try :) IronScheme firstly tries to implement Scheme (R6RS specifically), with the secondary objective being CLR interoperability. Compared to Clojure (focusing on the their bad points), IronScheme won't: give you CLR runtime exceptions; IronScheme uses Scheme's ...


21

It depends on your specific needs, and the strenghts and weaknesses of the particular implementations. That said, here is what first comes to my mind when thinking about different implementations: SBCL is pretty fast, and good at number crunching. So, if you depend on heavy numerical computation, that might be the right implementation for you. Also, it has ...


20

Read On Lisp and then decide for yourself. My summary is that Ruby is better at providing convenient syntax. But Lisp wins, hands down, at the ability to create new abstractions, and then to layer abstraction on abstraction. But you need to see Lisp in practice to understand that point. Hence the book recommend.


19

I like Lisp for its unified, simple and elegant way of representing both code and data. unique point of view, which gives me the crucial 80 bonus IQ points on solving hard problems (with hat tip to Alan Kay) extremely agile, interactive and conversational development environment unprecedented power to create and manipulate abstractions Programming is ...


19

I program in both CL and Racket. I'm developing a Web site now in Common Lisp, and I wrote a suite of in-house programs for my previous employer in Racket. For the in-house code, I chose Racket (then known as PLT Scheme) because the employer was a Windows shop, and I couldn't get them to pay for LispWorks. The only good open-source CL implementation for ...


19

Maybe all I hear about Lisp(s) changing your life is just a big practical joke on the newbies Absolutely not true, It isn't a joke. With Lisp you are going to build any thing you want, even your own programming language. You will be enlighten no matter what you pick whether it is CL, Scheme or Clojure. I personally recommend that you learn Clojure ...



Only top voted, non community-wiki answers of a minimum length are eligible