3 ms·
> While the solution described is cool, it only applies to problems that can be solved with union types in F#. I'm not even sure it achieves that. Without line
by pron 11y ago
> While the solution described is cool, it only applies to problems that can be solved with union types in F#.
I'm not even sure it achieves that. Without linear types (or "typestate"), if an operation (say, delete) actually modifies a database or a file -- as would normally be the case -- you can have outdated references of the wrong type (ActiveUser) pointing to the same DB record. They've just introduced a far worse runtime inconsistency (while staying perfectly type-safe)!