4 ms·
> The thing for me is the type system shouldn't decide whether or not a certain piece of information is critical to the system. No, that is in fact the stated
by klmr 8y ago
> The thing for me is the type system shouldn't decide whether or not a certain piece of information is critical to the system.
No, that is in fact the stated purpose of the type system. If you don’t want to make such a decision statically, you mark a field appropriately (e.g. via an Option type).
- SkyPuncher 8y agoI understand that's the stated purpose. I'm demonstrating how I feel types can pretty much become useless when integrating with an outside system. If everything is optional, then you might as well not use a type system in the first place.
- klmr 8y agoAgain, there’s virtually never a reason to make everything optional/variant. It’s a conscious design choice and should be used judiciously (otherwise the API becomes difficult to use, and the same is true in a purely dynamic system).