▲ | MrJohz 2 days ago | |
Doesn't Erlang/Elixir solve this by having every function do its own parsing (via pattern matching) and then failing fast if something goes wrong? That seems intuitively like a good approach to take — you can't make any real guarantees across machine boundaries, but you can use structural typing at the edges to ensure that the data coming across the boundaries has the right shape. |