Hacker News new | ask | show | jobs
by chrisjharris 1477 days ago
Dhall is in some ways actually harder (at least, stricter) than Haskell, I think. The fact that there's guaranteed completion means the code has to have complete integrity. If you've defined a union type, then anytime you define a polymorphic function that takes that union type as an argument, you need to both handle all of the union type's actual types, and handle them properly. So even if you as the developer know that that one of the types is never going to actually be passed to this function, you can't just throw an error or set that scenario as undefined.