4 ms·
If what you're thinking is the so called Design by Contract (using preconditions and postconditions), there are plenty of languages with that feature: The orig
by berdario 12y ago
If what you're thinking is the so called Design by Contract (using preconditions and postconditions), there are plenty of languages with that feature:
The original one is Eiffel, if I'm not mistaken:
http://en.wikipedia.org/wiki/Precondition#Eiffel_example http://en.wikipedia.org/wiki/Precondition#Eiffel_example
Clojure:
http://blog.fogus.me/2009/12/21/clojures-pre-and-post/ http://blog.fogus.me/2009/12/21/clojures-pre-and-post/
Ada 2012, apparently:
http://www.adacore.com/uploads/technical-papers/Ada2012_Rationale_Chp1_contracts_and_aspects.pdf http://www.adacore.com/uploads/technical-papers/Ada2012_Rati...
The slightly lesser known Cobra:
http://cobra-language.com/trac/cobra/wiki/Contracts http://cobra-language.com/trac/cobra/wiki/Contracts
(of these, I only ever wrote Clojure, and I've used a couple preconditions in production, I definitely like the concept)
- jtfairbank 12y agoThanks for the name and links!