7 ms·
I won't go into details about deficiencies of Lisp. That's another problem to be discussed; an extremely painful problem, in fact. I don't buy it. Nobody wan
by mrottenkolber 13y ago
I won't go into details about deficiencies of Lisp. That's
another problem to be discussed; an extremely painful
problem, in fact.
I don't buy it. Nobody wants to talk about these apparently obvious (to non Lispers) problems of Lisp, yet they are still there? Bring them up and be argued with or be quiet.
Later he talks about the ugliness of Lisp syntax, especially CL, but Scheme and Clojure are supposed to be better. On what basis? I may admit scheme is elegant, but calling clojure's syntax an improvement over CL is a pretty long jump.
- cbp 13y ago> Later he talks about the ugliness of Lisp syntax, especially CL, but Scheme and Clojure are supposed to be better. On what basis? I may admit scheme is elegant, but calling clojure's syntax an improvement over CL is a pretty long jump. Having syntax for 4 different data structures instead of just one would be one of my main reasons. Also, the syntax of a lisp-1 is cleaner.
- mrottenkolber 13y agoBecause what if there where 6 equally important datastructures, or 100? The only datastructure you need to express when you are programming is the AST, in my humble opinion, and lists serve it well, visual trees might be interesting. The Lisp-2 design has a very good practical reason: 50% of a common type of mistake are impossible to make. More namespaces don't hurt a language, while less namespaces usually do (Javascript for instance).
- Jtsummers 13y agoWhile I like scheme and clojure, why do you think lisp-1's are cleaner? Perhaps it was just my order of learning, but I rather liked the different namespaces CL provided, primarily as it eliminated name collisions between variables and functions. If list were an appropriate variable name, I could call a thing list versus the abbreviated form lst in scheme (that's a trivial example, but I recall more name collisions back when I was using scheme and CL as hobby languages). I guess, syntax-wise, the main difference is no longer needing funcall, which was a headache when I was learning CL.
- blueblob 13y agoI think many people that don't like lisp haven't spent much time with it. I personally do not like lisp. I took an artificial intelligence class where we wrote search techniques in common lisp. One problem that I had with lisp is the end of my A* search had a massive number of parenthesis at the end. I think this would have been a little better if we were taught about common lisp structs earlier on. My next big problem was that I was coming from C where you occasionally put extra parenthesis in to group portions of code (sometimes necessary in macros or if statements). This is a very bad habit in lisp because it tries to call a function.
- dllthomas 13y agoThere've been dialects of Lisp where a single ] would close all outstanding open parentheses. Having never actually used one, I reserve judgment on whether this is a good or bad idea.
- AUmrysh 13y agoI think, just like any other syntactic sugar, it's fine if used with proper understanding of possible consequences. I'd like to see lisp use indention instead of parens like Python. I'm sure someone's done it and it isn't popular for some reason or another, but I think getting rid of the parens would go a long way to making people stop hating LISP.
- blueblob 13y agoI don't see how lisp could get rid of parends with indentation. Parends are used for function calls so you would then have to indent one extra level to call a function? If there was a workaround for the function calls, then it would also require every function to be written on a separate line, there would be no concept of a one liner.
- dllthomas 13y agoBuilding a tree with indentation is easy. You would need some method to distinguish between a one element list and a value, and some method of specifying an empty list (though you could just write nil). One option that leaves everything completely uniform is to use something that says "this starts a list", and then have the (zero or more) elements indented including the list head if present. If we use (), this would read like: () prin1 () * () + 3 4 7 Exceedingly vertical, obviously, if you don't allow inline parens at all. If you were, you could compress any run of lines by simply moving everything with no children into the parent parens. Applying that only to the deepest bit of the above, we'd get: () prin1 () * (+ 3 4) 7 Of course, the original could be transformed into actual lisp by simply moving end-parens: ( prin1 ( * ( + 3 4 ) 7 ) )
- rsynnott 13y ago> but calling clojure's syntax an improvement over CL is a pretty long jump. Well, it has all of _three_ types of brackets, which may be reassuring to the C++ programmer.