Syntactic sugar for Design by contract in JavaScript.
Design by contract is a very powerful technique for writing robust software, it can be thought of as a formal but convenient method for specifying assertions.
Instead of the developer documenting their assumptions in comments, or worse, not documenting them at all, DbyC gives them a way to express their assumptions in a convenient syntax, and have those assumptions validated at runtime.
Contractual is a transpiler, that takes Contractual JavaScript and turns it into JavaScript which enforces the contracts.
In Contractual, there are two types of contract, preconditions and postconditions.
Your new post is loading...