Re:Dependent Types for F#
by joeblubaugh on Tuesday December 05, 2017 @01:19PM
(#15854099)
It's significantly different than subclassing. The wikipedia examples are instructive:
[ Parent
| on HN ]
That's a subclass with an object invariant.
(Gotta use the new buzzwords to be l33t. Even for old ideas.)
Re:Dependent Types for F#
by joeblubaugh on Saturday December 09, 2017 @01:34PM
(#15887222)
Sure, so if you use Ada you can write types like this and the runtime will enforce your invariants automatically. What other non-academic languages support that? It’s something I miss from Ada for sure.