|
|
|
|
|
by gsk22
62 days ago
|
|
> Libraries that were made independently usually fit together like a glove because they are all just maps/vectors in -> maps/vectors out. This is also the biggest weakness of Clojure (IMO). When everything is "just data", you spend a lot of time digging deep in libraries trying to figure out exactly what shape the data should take. Additionally, the shape of input data is almost never validated, so you spend lots of time debugging nasty type errors far from the place where bad data entered the program. There have been some abortive attempts at solving this with things like spec, Prismatic Schema, etc, but nothing that has taken hold like TypeScript did with JS. I'm still waiting for my dream language with the flexibility and immutability of Clojure, but without the pain points of an anything-goes attitude towards typing and data shape. |
|
or that is a good spend of time where you familiarize yourself with said library (as they say, the documentation is the code!).
Usually the library is well written enough that you can browse through the source code and immediately see the pattern(s) or keys. The additional experimentation with the REPL means you can just play around and visually see the data in the repl.
A spec does similar (and it does make it easier to seek through the source to find it).