Comment by Myrmornis
7 years ago
Have you tried it, just a beginner tutorial or something? But if you do, please use an editor that puts paired parens in for you automatically, otherwise there's a risk of thinking that it is painful.
7 years ago
Have you tried it, just a beginner tutorial or something? But if you do, please use an editor that puts paired parens in for you automatically, otherwise there's a risk of thinking that it is painful.
I tried it years ago, but I think I had too little experience to understand the use case back then. I hadn't ever done any functional programming at that point so it kind of went over my head.
I still hate Haskell. But maybe I would like Lisp? A lot of people here seem to love it so that's why I made this thread :)
OK I'll have a go, but others will be able to do a better job than me!
Yes, you might like lisp and I definitely think it's worth trying. You often hear people saying "lisp has no syntax" and that's one of the main things about lisp. I think a good first step is to understand what people mean by that. You know the way a compiler or interpreter, after tokenizing and parsing, transforms code into an intermediate data structure representation called an "abstract syntax tree"? What they mean is that lisp is like jumping straight in at the AST stage. You're literally programming with data structures, instead of programming with syntax that gets turned into data structures. People find that a very rewarding intellectual/mental experience. It really teaches you that the words "statement" and "expression" mean different things. And it shows you a way of programming without a lot of "state" -- just expressions feeding into other expressions, without as much use of "local variables". More deeply, this is directly connected with formal ideas in mid-20th century theoretical computer science (in particular the "lambda calculus") about the minimal programming constructs needed to create a Turing complete language. In lisp it leads also to very powerful and somewhat mind-bending "macros" -- since code is data structure, you can very naturally write code to transform code, so the "final" code that is executed is partially the product of an initial execution phase where code is just working on code creating other code.
Having no syntax (or minimal, languages like clojure introduce a bit with square and smooth parens etc) means you basically just write expressions grouped by smooth parens. It's very beautiful and minimal experience to write. Just, seriously, do it with an editor/IDE that inserts paired parens for you, it promises to be a great experience with that, but without it a lot of people just give up saying why do they have to keep writing so many parens, which is missing the point entirely -- The parens are the fabric of the program!