Idiomatic Errors in Clojure

Viewed 94
The post discusses idiomatic error handling in Clojure, emphasizing the complexity and controversy around various patterns like error maps, exception handling, and the concept of maintaining code semantics while managing errors effectively. Key points include the distinction between different languages' error handling approaches, the challenges of using return values to convey errors, and the preference for explicit error handling mechanisms over exceptions. Comments suggest that while idiomatic practices are good, they can lead to complications in code clarity and execution flow. The balance between using error values and exceptions is highlighted, alongside the potential of using advanced techniques such as monads and Clojure's `spec` for error handling.
0 Answers