3 ms·
> dynamically checks that the type is correct How thorough is this? Beartype is also on the front page right now, and its README contains an example of dynamic
by pansa2 5y ago
> dynamically checks that the type is correct
How thorough is this? Beartype is also on the front page right now, and its README contains an example of dynamic type checking in Python that takes over an hour to run [0].
Is Toit able to avoid being that slow?
[0] https://github.com/beartype/beartype#why-should-i-use-beartype https://github.com/beartype/beartype#why-should-i-use-bearty...
- floitsch 5y agoToit doesn't have generic types yet. This limitation means that the dynamic checks are very fast. Since these checks also allow some optimizations, the cost of the dynamic checks is maybe 10-15%. And that's before doing a global type-inference, which should remove many of the checks.