Fuss-free data validation without using exceptions: Scala, Rust, Swift, Haskell


Details
The process of data validation can be messy and annoying, especially in the case of composite data where there could be many sources of errors and a need to collect all the errors found rather than bail out upon finding the first one. In practice, what often happens is that thorough validation ends up not being done because it's too painful to code. Martin Fowler recently wrote an article about the problem and proposed a solution http://martinfowler.com/articles/replaceThrowWithNotification.html but it is also painful.
There is a very clean solution that can be expressed in any language, so we will show the language-independent concepts so that you can use them anywhere.
However, since the solution is particularly concise to express in a certain class of languages that includes Scala, Rust, Swift, and Haskell, we will present concrete code in Scala, Rust, Swift, and Haskell to illustrate the concepts.
Speaker => Franklin Chen

Fuss-free data validation without using exceptions: Scala, Rust, Swift, Haskell