News for hackers. Stuff that matters.
Re:A word for a value between 0 and 1 (inclusive) by mrgriffin on Friday September 04, 2020 @06:38AM (#24373703)
FWIW, that's not dependent typing, because the type doesn't depend on run-time values. A bool is either true or false, a [0...1] is either 0 or, ..., or 1.

As for which languages allow it. I'm not sure for floats, but Pascal let you do it for ints for sure. https://wiki.freepascal.org/subrange_types

There are no comments on this comment yet.