|
|
|
|
|
by ldite
473 days ago
|
|
The dynamic typing and "everything is a map" can be a PITA. At the moment I'm working on a codebase that has I/O to JSON APIs, Avro schemas and postgres databases. That means that a field called "date" can be either a string, integer days since the epoch or a Java Date, and (because this codebase isn't great) there's no way of knowing without tracing the call stack. With the right discipline (specs, obsessively normalising all data at the boundaries, good naming conventions) this wouldn't have been a problem, but that discipline is optional, and headbanging aggravation results. (This is, of course, a generic "dynamic typing" problem, but that's a key feature of Clojure) |
|
But this is because JSON is an untyped data structure. (And btw, a flawed one...)
You would have this problem in any programming language.