Is operator

The is operator is evaluated during semantic analysis to check for type equivalence. It is therefore very useful for type specialization within generic code:

  1. type
  2. Table[Key, Value] = object
  3. keys: seq[Key]
  4. values: seq[Value]
  5. when not (Key is string): # empty value for strings used for optimization
  6. deletedKeys: seq[bool]