News for hackers. Stuff that matters.
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:

  a dependent type is a type whose definition depends on a 
  value. A "pair of integers" is a type. A "pair of integers 
  where the second is greater than the first" is a dependent 
  type because of the dependence on the value.
Re:Dependent Types for F# by Animats on Tuesday December 05, 2017 @09:16PM (#15857979)
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.