> real structs
I'm not even sure if value types are conducive towards immutable, persistent data structures. I'm certainly excited for project Valhalla but I'm not sure if Clojure, nor any Clojure-like JVM language, written in an idiomatic fashion, would really benefit from it.
> light-weight concurrency like Go
Project loom is already in preview mode. Lightweight concurrency is practically here for any JVM language, and once it's fully released I will likely have zero reason to use core.async.
> type support
Static typing is A Thing you can choose to do, but I doubt you would get many daily Clojure users agreeing that it is "better". I think it's different and better in some circumstances but not necessarily others. It definitely feels trendy these days, sorta like how dynamic typing felt trendy 15 years ago.
One of the things I find most interesting is that the Clojure community seems very interested in a "Clojure everywhere" style of doing things: you have Clojure, ClojureScript, Babashka, deps using edn, build using Clojure source, etc. But at the same time, perhaps for historical reasons, they lean into heavy interop with the underlying ecosystem - it was a big reason why Clojure was able to become as widely adopted as it has been, and it's also a big reason why the language itself will never really hold you back despite being a niche one (you can always rely on a Java library, etc.).
There is a reason why all dynamically typed languages today are scrambling to add some form of static typing to their language, but never the other way around.
Static typing does everything dynamic typing does, but better, faster, allow automatic refactoring, faster programs, better navigation, better documentation, better maintenance.
However, to be fair, Clojure's response to types is `org.clojure/spec.alpha`, and if you give it a really good chance, you'll see that it brings a lot to the table.
It doesn't change that I believe strong typing (a Haskell or Idris/Agda-like flavour of it) to be the future, but what it did change was how I thought about type systems and how to write and test programs.
"All your life's work for naught, pepaw. If only you had been on the right side of history".
I do have a substantive disagreement with this statement: "There is a reason why all dynamically typed languages today are scrambling to add some form of static typing to their language, but never the other way around".
Languages like C#, Java, Scala, and Typescript all have all adopted some degree of type inference. Their users wanted it for a long time. To begin with, none of these languages are anywhere near as strictly-typed as a language like Haskell. Clearly even developers on "the right side of history" don't want to maximize static type checking in all cases, so the issue is not as cut and dry as you make it sound.
The thing is, having some structure in terms of types or data shape constraints helps you model and understand your program. You can change them as your understand of your program changes or the need arises. You can be against static types because they force you to slow down and think about things before you can just get to coding, and it can be sometimes annoying to model your system using them (and sometimes not so useful), or other technical reasons like some type systems don’t allow you to model certain things, but to say it just leads to devs putting the real world into stupid, arbitrary categories when the real world (and your program!) primarily have data that can be trivially categorized because that’s what Rich Hickey said makes you sound like cargo-culting or parroting a point without diving deeper into the specific reasons and potential counterarguments.
We have to have both: types and external schemas in oo languages.
Plus, types make working with maps cumbersome and force you to maybe unnecessary data cages called dto-s
I appreciate that it's a bit frustrating to have someone vaguely identify an area of concern and clarification and actionable suggestions are much more valuable.
There's two things. One is that the data structure ontology[1] is difficult to internalize because of its complexity. When I write Clojure code, I consider the capabilities of the data structures being passed to the function. I think we have some implicit understanding of this early on. You expect the type of such and such to support seq-ing or deref-ing or something else. You're thinking in terms of capabilities and that's good. But if you want to be exacting, at some point you'll have to be able to point to an interface or several in the diagram and say, "yes, I really do expect something that conforms to IPersistentVector or IMeta or something else. In order to preserve backwards compatibility, this is more confusing than it needs to be. Moreover, at that point, you're not in Clojure-land anymore.
My second point is that at this step in the narrative, you're reading Java code and the illusion of 100 functions is broken. I ask myself, "Why, aren't Clojure data structures implemented in terms of protocols?" There's a perfectly good way of abstracting functionality that seems good enough for users, but not good enough for standard library implementers? It feels like the answer is, "We don't want to break Clojure1.x and we don't want to deal with the Python3 problem." Which is fair, admirable even, but it still leaves me left wanting. I think there's a simpler, more consistent Clojure hiding in there, waiting to be let out.
Apologies for the awkward way this reads; I simply wanted to get it out before lunch time.
1. https://raw.githubusercontent.com/jafingerhut/clojure-classe...
An example of clojure performance issues covered here: https://tech.redplanetlabs.com/2020/09/02/clojure-faster/
All that stuff above should be fixed at the language/stdlib level.
But what is your take on what needs fixing ? What would have been your solution for the N data-structures/ M algo problem you mentioned above ?