4 ms·
Pascal has subrange integer types. I'm wondering if any other language besides family relatives Ada or Delphi has this, apart from dependent type systems like I
by burnt-resistor 1y ago
Pascal has subrange integer types. I'm wondering if any other language besides family relatives Ada or Delphi has this, apart from dependent type systems like Idris[0] or an explicit Haskell type like Data.Range.[1]
0. https://stackoverflow.com/questions/28426191/how-to-specify-a-number-range-as-a-type-in-idris#28436452 https://stackoverflow.com/questions/28426191/how-to-specify-...
1. https://hackage.haskell.org/package/range-0.3.0.2/docs/Data-Range.html https://hackage.haskell.org/package/range-0.3.0.2/docs/Data-...
- adgjlsfhk1 1y agorust has this to some extent (also enums can be seen as an evolution of this for some use cases)
- steveklabnik 1y agoAnd it's quite possible it will get a fully equivalent thing someday, we'll see.