
Parse, Don't Validate - phonebucket
https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
======
cosmic_quanta
To me, this is the highlight of this post:

    
    
      Consider: what is a parser? Really, a parser is just a 
      function that consumes less-structured input and 
      produces more-structured output. By its very nature, a 
      parser is a partial function—some values in the domain 
      do not correspond to any value in the range—so all 
      parsers must have some notion of failure. Often, the 
      input to a parser is text, but this is by no means a 
      requirement (...)
    

Then, the title of the post could be: _Leverage the type system to represent
your data, not validating it post-facto_

~~~
nine_k
Or, "make invalid state unrepresentable".

~~~
lsb
That's a great phrase from [https://blog.janestreet.com/effective-ml-
revisited/](https://blog.janestreet.com/effective-ml-revisited/)

