4 ms·
Eiffel's contracts are really compelling, I wish there was a reasonable, non-hacky way to implement them in more mainstream languages.
by phpnode 12y ago
Eiffel's contracts are really compelling, I wish there was a reasonable, non-hacky way to implement them in more mainstream languages.
- loumf 12y agoI wouldn't say that clojure is mainstream, but their implementation is reasonable and makes sense in the clojure idiom (just a meta-data map on the function)
- phpnode 12y agoTurns out there's a sort of reasonable way to implement them in JavaScript, it's definitely hacky though - http://codemix.github.io/contractual/try.html http://codemix.github.io/contractual/try.html