Given the simplicity of my macro, I didn't call this 'contract programming' on purpose. For real JavaScript Contract Programming, check out contracts.js (from the same author of sweet.js).
Among others(there are many contract implementations for js on github) this one is pretty average, not modern enough, not compatible with code which uses promises. Such implementation should go beyond direct arguments and result value of function call.
Comments
Given the simplicity of my macro, I didn't call this 'contract programming' on purpose. For real JavaScript Contract Programming, check out contracts.js (from the same author of sweet.js).
Among others(there are many contract implementations for js on github) this one is pretty average, not modern enough, not compatible with code which uses promises. Such implementation should go beyond direct arguments and result value of function call.