Re:State of Clojure Survey 2019 Analysis
by ken on Thursday February 07, 2019 @08:10AM
(#19104945)
Different person here, but here goes.
> Wouldn't the same be said by most programmers with a high degree of proficiency with a language?
Perhaps for some, but not for me. Clojure is by far my favorite language, despite not being one that I'm most proficient in -- maybe not even my top 5 right now.
> What sets Clojure apart from Haskell or Scala or Elixir or Erlang?
For one thing, I've never written a (non-trivial) program in any of those other languages. :-)
Based on just what I've heard: Elixir and Erlang sound like good languages, and they're next on my list to learn, and I might well feel the same about them. For Scala, the one thing I've heard consistently is that it's incredibly complex, which is the opposite of one of the main reasons I like Clojure, so it's unlikely I would feel the same about it.
> Do you have a high degree of proficiency with something else?
Yes, I've earned money for writing assembly, C, C++, Java, C#, Python, Ruby, Tcl, Common Lisp, Objective-C, Swift, JavaScript, and probably a couple others I'm forgetting at the moment. Even after a couple years in those other languages, when I felt I was getting pretty good, I never felt like any of them were a great model of computation.
> Clojure is the language that I have always wanted to learn, but the benefits never seemed very apparent. I'm hoping your response will make them clear.
Writing a program in a language like C# or Swift or Python, to me, means taking 100 random pieces of kit (which look like the inside of Anders'/Chris's/Guido's head) and being creative enough to find a way to assemble them into something that works like I want today. None of them ever matches the problem space very well, so I have to pick how to compromise the design, and guess what axis of flexibility I'll want in the future. Next week when my requirements change, I learn that I often picked wrong, so now I have to redo part of it. The syntax is complex. Managing state is complex. Decomposing problems into reusable pieces is hard. Developing a new version of a program usually means rewriting methods I've already written (for new features, additional genericity, etc), and I personally find that frustrating. I want to finish things, once. I like it when languages let me extend built-in types with methods I think they ought to have had in the first place, but I'm also annoyed that I have to write these at all.
When I first tried Clojure, almost everything felt natural right away. The syntax is pretty simple -- just complex enough, beyond classic Lisp, to make common data structures (list/array/dict/set) easy to type. Learning Clojure mostly consisted of learning their new names for functions -- either functions I already knew, or which I guessed would probably exist (and always did). Remarkably, I usually find that the easiest way to solve any given problem in Clojure happens to result in functions which are already generic and composable and reusable. Once written, I very rarely have to touch a Clojure function again, either for correctness or modularity. (The obvious exception is the front-end, which is a thin simple layer that is easy to change.)
I can pretty much guess how I think something ought to work in Clojure, and it does. The work is not figuring out how to map my problem to the syntax of the language (and then having to maintain that state and those invariants), but simply writing some simple functions (map data to data) to transform the format I have to the format I need.
> Wouldn't the same be said by most programmers with a high degree of proficiency with a language?
Perhaps for some, but not for me. Clojure is by far my favorite language, despite not being one that I'm most proficient in -- maybe not even my top 5 right now.
> What sets Clojure apart from Haskell or Scala or Elixir or Erlang?
For one thing, I've never written a (non-trivial) program in any of those other languages. :-)
Based on just what I've heard: Elixir and Erlang sound like good languages, and they're next on my list to learn, and I might well feel the same about them. For Scala, the one thing I've heard consistently is that it's incredibly complex, which is the opposite of one of the main reasons I like Clojure, so it's unlikely I would feel the same about it.
> Do you have a high degree of proficiency with something else?
Yes, I've earned money for writing assembly, C, C++, Java, C#, Python, Ruby, Tcl, Common Lisp, Objective-C, Swift, JavaScript, and probably a couple others I'm forgetting at the moment. Even after a couple years in those other languages, when I felt I was getting pretty good, I never felt like any of them were a great model of computation.
> Clojure is the language that I have always wanted to learn, but the benefits never seemed very apparent. I'm hoping your response will make them clear.
Writing a program in a language like C# or Swift or Python, to me, means taking 100 random pieces of kit (which look like the inside of Anders'/Chris's/Guido's head) and being creative enough to find a way to assemble them into something that works like I want today. None of them ever matches the problem space very well, so I have to pick how to compromise the design, and guess what axis of flexibility I'll want in the future. Next week when my requirements change, I learn that I often picked wrong, so now I have to redo part of it. The syntax is complex. Managing state is complex. Decomposing problems into reusable pieces is hard. Developing a new version of a program usually means rewriting methods I've already written (for new features, additional genericity, etc), and I personally find that frustrating. I want to finish things, once. I like it when languages let me extend built-in types with methods I think they ought to have had in the first place, but I'm also annoyed that I have to write these at all.
When I first tried Clojure, almost everything felt natural right away. The syntax is pretty simple -- just complex enough, beyond classic Lisp, to make common data structures (list/array/dict/set) easy to type. Learning Clojure mostly consisted of learning their new names for functions -- either functions I already knew, or which I guessed would probably exist (and always did). Remarkably, I usually find that the easiest way to solve any given problem in Clojure happens to result in functions which are already generic and composable and reusable. Once written, I very rarely have to touch a Clojure function again, either for correctness or modularity. (The obvious exception is the front-end, which is a thin simple layer that is easy to change.)
I can pretty much guess how I think something ought to work in Clojure, and it does. The work is not figuring out how to map my problem to the syntax of the language (and then having to maintain that state and those invariants), but simply writing some simple functions (map data to data) to transform the format I have to the format I need.