What I meant by "fits clojure's philosophy" is the fact that
it decouples human-readable message from the specific type and info about the error (e.g. instead of string "ClassCastException: can't cast from X to Y" that'd be edn: {:type :clojure.errors/cast, :from X, :to Y} - something like that);
it allows to add new errors and change the reporting format without introducing breaking changes (growth, not breakage).
You mean that errors should not be a part of the contract, so they can change and evolve and be not locked up by backwards compatibility?
You mean that errors should not be a part of the contract, so they can change and evolve and be not locked up by backwards compatibility?
That. Trying to catalog the universe of possible Clojure errors and maintain that with compatibility over time does not seem like a good use of anyone's time. I think it's a dubious claim that this would actually be useful to tools or as an entry to alternate docs either.
Well, I would disagree (errors always were the main complaint + maria.cloud does a great job at improving the experience, but the approach they took could only get us so far; clojuredocs for errors (with examples etc) would be awesome imo), but I can definitely see your point. Thanks!
1
u/alexdmiller Aug 11 '18
No plans, and I think locking stuff like that in codes is actually antithetical to Clojure's philosophy of making things amenable to evolution.