Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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-...

1. https://hackage.haskell.org/package/range-0.3.0.2/docs/Data-...



rust has this to some extent (also enums can be seen as an evolution of this for some use cases)


And it's quite possible it will get a fully equivalent thing someday, we'll see.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: