Of course, when your keys are integers without holes you can and should use a plain array or seq.
For the check at compile time, maybe something like
static:
assert(myTable(33)) != nil # or assert(myTable.hasKey(33))
Or maybe compileTime pragma -- can not remember the difference to static...
For an array you can write something like
const myArray = array[1 .. 3, cint] = [14.cint, 23, 4]
