4 ms·
It's an interesting phenomena to look at from a language philosophy perspective. AFAIK, Rich Hickey has advocated for a very pragmatic approach to programming f
by voidhorse 8y ago
It's an interesting phenomena to look at from a language philosophy perspective. AFAIK, Rich Hickey has advocated for a very pragmatic approach to programming from coljure's inception, and I believe (perhaps excepting the introduction of Spec) the language has stuck to and reflected that philosophy. I believe Hickey has even gone so far as to say it's usually a waste of time to fiddle around with type declarations when you should be solving problems and transforming data (I'm paraphrasing, of course).
Contrarily, nearly every other popular modern programming language project (Haskell, Rust, Scala, Crystal, to name a few) hopes to provide nuanced, robust type systems and compile time guarantees--these projects focus less on pragmatics and problem solving and more on correctness and safety. Even elm, which is just a language for building frontends, boasts of its compile time guarantees and elimination of runtime issues using a type system. Clojure is the only recent language that I know of to go against the grain in this regard. That might factor into its decline in popularity--presumably all of these languages are going after type safety and correctness because they are perceived as features people desire these days and clojure never emphasized these properties (some of the things it emphasized instead, such as immutability, problem solving, and interoperability with an existing platform are still important features ,they just don't happen to be as prized right now as correctness/safety and perhaps noiseless/sparse syntax).
The introduction of spec can even be perceived as a sort of concession to this popular demand. Even the spec about page hints at the slight[1] incongruence between spec and the overall Clojure philosophy:
"However it has always been a guiding principle of Clojure, widely valued and practiced by the community, to simply represent information as data. Thus important properties of Clojure systems are represented and conveyed by the shape and other predicative properties of the data, not captured or checked anywhere since the runtime types are indistinguishable heterogeneous maps and vectors."
https://clojure.org/about/spec https://clojure.org/about/spec
[1]: Slight because the purposes of spec are not those of a type system or compile checks. What spec does do, however, is introduce some of the bookkeeping sorts of procedures that, in my estimation, the design behind clojure intended to minimize as much as possible.