4 ms·
A bit of both, actually. It's mostly compile-time checking, but you can also write assertions about the typestate of a particular variable. The compiler generat
by cwp 15y ago
A bit of both, actually. It's mostly compile-time checking, but you can also write assertions about the typestate of a particular variable. The compiler generates code to check the actual values at runtime - if the assertion fails, the program is aborted. The really cool bit is that the compiler can take the assertions into account when compiling code that follows the assertions.