3 ms·
"design by contract" is the general term [see http://c2.com/cgi/wiki?DesignByContract http://c2.com/cgi/wiki?DesignByContract]. d and racket have excellent supp
by zem 11y ago
"design by contract" is the general term [see http://c2.com/cgi/wiki?DesignByContract http://c2.com/cgi/wiki?DesignByContract]. d and racket have excellent support for it
https://dlang.org/spec/contracts.html https://dlang.org/spec/contracts.html
http://docs.racket-lang.org/guide/contracts.html http://docs.racket-lang.org/guide/contracts.html
and here's a library to add it to ruby (i've seen a couple of others floating around):
https://egonschiele.github.io/contracts.ruby/ https://egonschiele.github.io/contracts.ruby/