Hacker News new | ask | show | jobs
by pjmlp 1142 days ago
Yes, you would have different set of classes with invariants.

With template metaprogramming those invariants can be done at compile time.

It is a matter of type system design, the whole point of type-level programming.