154 karma · joined June 4, 2020
If you prototype a new features for an existing system, a test let you execute only the code you actually need. This will shorten your feedback loop and allow you to iterate faster. Refactoring a test is fine. Writing a BS test just to explore a solution is fine. In my experience following a test lead practice will help you build a simpler system which will be easier to maintain.
The emphasis to work directly with the data is quite unique to clojure (as I'm aware of, please proof me wrong on this) which allows me to just dive in and think about the problem I want to solve instead of fighting my language or framework. The interactivity of the environment paired with immutability results in an instant feedback loop which let me get into mental flow really fast, which is a joy.
> compiler telling you if the pieces still fit together?
You still write tests in scala do you?
I wish that would be true. Would make my current job a lot easier.
In my experience this is something where clojure is exceptionally good at.
> Clojure will always be slow, because it's not cache friendly.
You always have the option to use the java data structures, for the cases this kind of optimization is needed.
> The same is true for the rest of the things you've mentioned: none are specific to static typing!
Sure, I could be wrong here. I frequently am. But could you point out why do you think that?
Static types are awesome for local reasoning, but they are not that helpful in the context of the larger system (this already starts at the database, see idempotency mismatch).
Code with static types is sometimes larger and more complex than the problem its trying to solve
They tightly couple data to a type system, which (can) introduce incidental complexity >(I'm still waiting for pattern matching + algebraic data types) This is a good example, if you pattern match to a specific structure (e.g. position of fields in your algebraic data type), you tightly coupled your program to this particular structure. If the structure change, you may have to change all the code which pattern matches this structure.
Sadly a lot of people won't even try clojure since it is dynamic typed. I see their point but nevertheless clojure does something really well here. As the author obserserves designing around some core data structures results in high code reuse. A library like spec is also way better in encoding business requirements than all the mainstream language typesystems e.g. a number in business context has mostly constraints like a particular range etc. I really looking forward to see someone come up with a static type system inspired by clojure's approach.
Clojure was an eye opener for me and I think it offers a great developer experience (e.g. I'm addicted to C-c C-p)
It seems my journey hasn't ended and I definitely have to check out CL!
But atm it's hard for me to give up the things clojure offers to me: persistent datastructures, access to a great ecosystem and a very good designed standard library.
[0] https://twitter.com/josevalim/status/1379771275627921409?s=1...
There is a saying "if something sounds too good to be true, it probably is".
I wonder how many other languages did the author try to know that clojure is the reason for his success?
That being said, I really enjoy writing clojure and I absolutely love the interactive style of development. I hope more devs would try it so that it would get more traction in mainstream development.