4 ms·
> not sure if these are checked at compile-time, run-time, or both It looks like Koto only checks types at run-time. That means its type annotations are essent
by pansa2 2y ago
> not sure if these are checked at compile-time, run-time, or both
It looks like Koto only checks types at run-time. That means its type annotations are essentially shorthand for something like Python's `if not isinstance(...): raise TypeError`.
- irh 2y agoYes that's right, they're checked at runtime (with the option to disable the checks if the performance cost is a concern) and failed checks simply throw exceptions. The hints aren't used for other purposes at compile time yet, but they could enable some warnings.