4 ms·
The standard advice with spec is to use it at the edges of the system, and not for every function and input. Probably because it incurs runtime overhead to use,
by KingMob 4y ago
The standard advice with spec is to use it at the edges of the system, and not for every function and input. Probably because it incurs runtime overhead to use, and design overhead to apply. On top of which, it's still listed as "alpha" after 6+ years.
As a runtime contract, spec can check things type systems can't, but IMO it's not pervasive enough in most code bases to really satisfy.
- kaba0 4y agoYeah, I absolutely agree. (Though perhaps using them internally as well may be okay, just disable it at prod)