4 ms·
I don’t really understand your point there. Sound type systems are equivalent to proof systems. You can use them to design data structures where their mere ev
by rq1 1y ago
I don’t really understand your point there.
Sound type systems are equivalent to proof systems.
You can use them to design data structures where their mere eventual existence guarantee the coherence and validity of your program’s state.
The basic example is “Fin n” that carries at compile time the proof that you made the necessary bounds checks at runtime or by construction that you never exceeded some bound.
Some languages allow you to build entire type level state machines! (eg. to represent these transactions and transitions)
- jpc0 1y agoMy point is a Width type is usually not the sound type you are looking for. What probably wanted was a size type which is width and height. Or a dimensions type which is width and height. The problem was maybe not two arguments being confused but in reality a single thing with two elements…
- rq1 1y agoAh I see, it’s a solution too!