by GreaterFool · 9y ago · 0 comments
https://github.com/bos/aeson/blob/master/Data/Aeson/Types/In...
> though the Clojure expressions are a little leaner
Yes they are. The price is complete lack of type safety. And the benefit is an insignificantly small reduction in boilerplate code.
The number of bugs I've seen where somebody would "get" a number that turned out to be a string or string that turned out to be a number...
OK, so it's trivial to add that as a constructor to the Haskell EDN type in the post, and you can even support it in JSON with a dictionary like
#myapp/Person {:first "Fred" :last "Mertz"}
is represented as {"#myapp/Person" : { "first" : "Fred", "last" : "Mertz" } }
What are the remaining objections?