Comment Comment by plainOldText Nim was inspired by Ada & Modula, and has subranges [1]: type Age = range[0..200] let ageWorks = 200.Age let ageFails = 201.Age Then at compile time: $ nim c main.nim Error: 201 can't be converted to Age [1] https://nim-lang.org/docs/tut1.html#advanced-types-subranges parent plainOldText 1 year ago