4 ms·
I would like to see an example on something less trivial than encoding `not empty` on the type. At some point the difference between what the author calls "pars
by hcarvalhoalves 7y ago
I would like to see an example on something less trivial than encoding `not empty` on the type. At some point the difference between what the author calls "parsing" and "validating" gets blurry, or the type system can't encode.
- danharaj 7y agoYou can always use abstract data types to indicate in the type system that you know something that can't directly be expressed. The point is not that "parsing" and "validating" are distinct concepts, but that they're two different points of view on the same problem.
- lexi-lambda 7y agoSee my other comment about this question here: https://news.ycombinator.com/item?id=21478427 https://news.ycombinator.com/item?id=21478427