4 ms·
That's false. In Clojure pretty much every single line of code has a minimum of two parenthesis (opening and closing). You can get all defensive about it, and o
by JDiculous 7y ago
That's false. In Clojure pretty much every single line of code has a minimum of two parenthesis (opening and closing). You can get all defensive about it, and of course one's perception of it is entirely subjective, but it's the main reason I don't use it.
- dragonwriter 7y ago> In Clojure pretty much every single line of code has a minimum of two parenthesis (opening and closing). Its a rare line of JS that doesn't include at least one of a conditional, a function call or definition, or grouping parens, outside of declarations. If you use "parens" broadly to include square, angle, and curly braces, JSX and declarations have plenty, too (and if you don't use "parens" that inclusively, Clojure/ClojureScript doesn't have all that many, because of its use of different delimiters for different purposes, unlike classical Lisp-family languages.)
- iLemming 7y agoIt's okay. A few years ago, I was in the same boat. Even if I completely believed that eating cocaine for breakfast is somehow beneficial for your health, that still would not be on the same level of how wrong was my prejudice against Lisp. Oh boy, I was so wrong about Clojure. I was working for a startup, building a .Net project with Angular 1.x. And I was on a failing trajectory - code was full of holes, I was struggling to finish things on time, I was stressed, I started to hate things for no apparent reason. Finally, after years of writing software, I just wanted to quit and learn something else - woodworking, photography, cooking, landscape design - whatever. Deep down, I knew - it was not due to the technology choice. The same project could've been re-written in other languages I knew and still be as frustrating. Long story short - I started learning Haskell. That improved my coding skills tremendously. But there was some hump I couldn't get over - Haskell was still extremely difficult, I was not even near to the level of being able to write production-ready Haskell code. Besides, I wanted to write web apps. And Haskell's options were not great at the time. After using Typescript, Coffeescript, LiveScript, IcedCoffescript, Gorillascript, Traceur, Babel, Fay, Haste, GHCJS, I finally decided to try Clojurescript. And suddenly, everything I've struggled with Haskell started making more sense. And unlike Haskell, Clojure turned out to be a much more pragmatic choice - I am more productive today than I ever was before. Even more than I was with Python, Ruby, or Go. Today, even if I have to write something in another language, I would first prototype it in Clojure and then translate it to another language. It may sound stupid, but that is the fastest way for me to build things. Learning Clojure opened a whole new world for me. Logic programming, generative testing, dependent types, concurrency and parallelism, distributed and numerical computing, probability, etc. I never knew all these things are approachable even by a lazy and simpleminded idiot like me. Learning Clojure improved my work, my relationship, my confidence, my health. The only regret I have - I carried my unfounded prejudice for years, but the door was there all the time, I kept ignoring it. I just needed to walk through that doorstep. Don't hate parentheses of Lisp - they may look ugly to you today, but trust me, there's a lot of beauty and elegance that you may not be seeing.