I don't have a horse in this race but I find it interesting that in my career I've seen a lot of bad code but the worst clusterfucks I've met where all in Clojure while the community seems to be chock full of purists and in general people that takes craftmanship seriously at least at face value. ¯\_(ツ)_/¯
I work with clojure, and love it, but believe the problem is caused by java or equivalent paradigms applied to clojure. The high probability that clojure was someone's first functional language could also contribute to the problem. Your thoughts?
Why I Switched from Python to Clojure (2016)
31–40 of 200 posts
Re: Why I Switched from Python to Clojure (2016)
#32Earlier quoted context omitted.
> I just cannot work with it. Can't or won't? I'm not being facetious, here. I just can't imagine any reason one _couldn't_ work with it, once the syntax is learnt. There's nothing about lisp-like syntax that's inherently hard to learn. Why is lisp special?
Not only is it not inherently hard to learn, it's arguably one of the easiest syntaxes to learn. ( fn-name param1 param2 ... ) is the syntax. Once the brain grasps this, a whole layer of complexity just vanishes. Furthermore, not having to use punctuation between items is just heavenly. There's so much less noise compared to Python, and Python isn't even a particularly noisy language.
Re: Why I Switched from Python to Clojure (2016)
#33> ...the “implied self parameter” on python methods turned me off. If I had a nickel for every time I got the "TypeError: random_function() takes 1 positional argument but 2 were given" because I forget the "self" parameter I could buy myself a coffee. Probably a fancy one from the Starbucks even!
I always thought this made sense: a method, considered as a property of a class isn’t yet bound to any particular instance while, considered as a property of an instance has an implicit parameter of the instance you’re currently operating on: languages like Java hide this “this” parameter from you by passing it automatically while python makes it explicit so you can form a better mental model of what’s going on
Yegge thinks that "self" is a wart and I agree. The article is a fun read but it's showing its age. I suspect Python might just have beaten Perl by now.
https://sites.google.com/site/steveyegge2/tour-de-babel#TOC-...
I suppose Python's way there's one less reserved word. Are there any other advantages?
Re: Why I Switched from Python to Clojure (2016)
#34Earlier quoted context omitted.
I work with clojure, and love it, but believe the problem is caused by java or equivalent paradigms applied to clojure. The high probability that clojure was someone's first functional language could also contribute to the problem. Your thoughts?
This is just blaming people for using Clojure's features though. If deep JVM integration wasn't a selling point, you'd use a vastly more mature Lisp, right?
Re: Why I Switched from Python to Clojure (2016)
#35> ...the “implied self parameter” on python methods turned me off. If I had a nickel for every time I got the "TypeError: random_function() takes 1 positional argument but 2 were given" because I forget the "self" parameter I could buy myself a coffee. Probably a fancy one from the Starbucks even!
I always thought this made sense: a method, considered as a property of a class isn’t yet bound to any particular instance while, considered as a property of an instance has an implicit parameter of the instance you’re currently operating on: languages like Java hide this “this” parameter from you by passing it automatically while python makes it explicit so you can form a better mental model of what’s going on
Re: Why I Switched from Python to Clojure (2016)
#36Earlier quoted context omitted.
Not only is it not inherently hard to learn, it's arguably one of the easiest syntaxes to learn. ( fn-name param1 param2 ... ) is the syntax. Once the brain grasps this, a whole layer of complexity just vanishes. Furthermore, not having to use punctuation between items is just heavenly. There's so much less noise compared to Python, and Python isn't even a particularly noisy language.
Only if you don't consider a forest of parens to be noise. I do. I'm sure I could get used to it after a while, but at first glance, Python code is definitely cleaner than Lisp.
Re: Why I Switched from Python to Clojure (2016)
#37I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.
I've programmed for 10 years in Clojure and have many regrets, but I've grown to just accept that Lisp syntax is correct. On day one you need to understand one thing. Years later, you need to understand one thing. And sure, in Clojure they happen to use three types of brackets for brevity but even that's optional. But other languages have dozens if not hundreds of little syntactical edge cases. I personally find that…
Re: Why I Switched from Python to Clojure (2016)
#38I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.
Re: Why I Switched from Python to Clojure (2016)
#39I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.
Re: Why I Switched from Python to Clojure (2016)
#40I don't have a horse in this race but I find it interesting that in my career I've seen a lot of bad code but the worst clusterfucks I've met where all in Clojure while the community seems to be chock full of purists and in general people that takes craftmanship seriously at least at face value. ¯\_(ツ)_/¯
Powerful abstractions are... powerful. They're more difficult to use correctly, and take longer to learn.
The conclusion shouldn't (always) be to avoid them entirely.