Tag Info

Hot answers tagged

55

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, ...


44

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 ...


31

I think the biggest advantage of learning Lisp, ML or Haskell for a Python programmer is the appreciation of thinking recursively for algorithmic problems, separation of mutable and immutable states, the importance of deterministic output types, the problems of type coercion, and a familiarity of basic functional programming building blocks such as lambda, ...


30

You should read Paul Graham's Beating the Averages article, which explains why Lisp can implement other languages' concepts but usually not the other way around. One of the key features Lisp has is real macros (as opposed to cpp or m4 macros). With macros, you can bend the language to whatever shape you'd like it to have. You can implement a complete OO ...


26

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 ...


23

Lisp has a simple syntax. It probably is the simplest practical syntax for a Turing-complete programming language. Lisp programs are data, in the most straightforward possible sense. This makes it possible for Lisp to process and manipulate itself. Lisp allows relatively straightforward creation of macros. Macros are a form of meta-programming, primarily ...


23

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.


22

There's a lot of good information in the other answers, but IMHO they are missing Stallman's point. I believe Stallman was referring to the fact that Lisp itself is a nice regular abstract syntax tree which can be executed by a lisp interpreter or compiler. The process of interpreting or compiling TCL (or another non-lisp language) is one of converting the ...


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

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 ...


21

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 ...


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 ...


20

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 ...


20

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 ...


19

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. ...


17

I'm sure if I leave the team, --not saying I'm leaving. :)-- no one would maintain it. Possibly False. If the program has value, and management sees the value, they will task someone with learning Clojure and maintaining it. Happens all the time. This program will be destroyed and some will develop with other language. Always true. So why worry ...


17

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 ...


16

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.


16

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 ...


15

Almost everything that was originally available only in Lisps has thankfully migrated into a lot of other modern languages. The biggest exception is the "code is data" philosophy, and macros. Code is Data (and Macros) - Maybe I haven't "gotten" macros, but I haven't seen a single example where the idea of a macro couldn't be implemented as a ...


15

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; } ...


15

In the context of the paper you linked, the words "micro-coded machine" would almost certainly refer to a Lisp Machine. At the time Lisp was beginning to get a foothold, it was hoped that it would be run (in the general case) on machines that were designed specifically to execute Lisp instructions, rather than computers with a more general instruction set ...


14

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 ...


14

Would you use a LISP dialect for a production program? Absolutely What kind of program and why? Lisp is a general purpose dynamic language. Today, it has the same basic difficulties as other general purpose dynamic languages that aren't published by Microsoft: Native threads, GUI integration, deterministic operation of the GC, and small memory ...


14

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 ...


14

A Lisp list is not really terminated with an empty list -- it's terminated with a special value, traditionally called nil. As it happens, that also traditionally evaluates as false -- which makes it about as close to C's null pointer as you can get (in C, a null pointer constant is an integer constant equal to zero, which also evaluates to false). An ...


13

This is probably counter to most peoples' recommendations, but steer clear of Emacs to start with, unless you already know it. Especially if you're used to modern IDEs/editors. I'm speaking from experience; I tried to start with Emacs, but having to learn the language AND the editor at the same time really frustrated me (especially since Emacs is so ...


13

I'm not an expert in Common Lisp, but I know both C# and Clojure reasonably well so hopefully this is a useful perspective. Simple syntax => power - Lisps are about the simplest syntax that could possible work. S-expressions are all you need. Once you've grokked "(function-call arg1 arg2 arg3)" then you've basically got it. The rest is just picking the ...


13

Ruby's facilities for DSL authoring don't change the nature of the language. Ruby's metaprogramming facilities are inherently tied to Ruby syntax and semantics, and whatever you write has to be shunted into Ruby's object model. Contrast that with Lisp (and Scheme, whose macro facilities differ), where macros operate on the abstract program itself. Because a ...



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