|
|
|
|
|
by lukashrb
1870 days ago
|
|
Nice article. 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. |
|
Turing completeness in a type system allows you to use the type system as a meta coding language which is a fantastic amount of string to hoist yourself with, putting meta languages inside languages is a miserable place to be
I'd argue that most people just want the language to check for mistakes, clj-kondo is great and effective at doing this https://github.com/clj-kondo/clj-kondo/blob/master/doc/edito...
If you want types at your system boundaries like on your API then specs or malli is great for that
A great thing that Rich Hickey always advocated is separating out problems and then solving them individually I think modern type systems try and take on too many problems at once, static analysis tools are great because they're uncoupled by time and are laser focused on detecting mistakes only