Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Design by contract
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Languages with native support=== Languages that implement most DbC features natively include: * [[Ada programming language|Ada 2012]] * [[Ciao (programming language)|Ciao]] * [[Clojure]] * [[Cobra (programming language)|Cobra]] * [[D (programming language)|D]]<ref name="d-contract-programming"> {{cite web | last = Bright | first = Walter | title = D Programming Language, Contract Programming | publisher = Digital Mars | date = 2014-11-01 | url = http://dlang.org/contracts.html | access-date = 2014-11-10 }} </ref> * [[C++26|C++26]] * [[Dafny (programming language)|Dafny]] * [[Eiffel (programming language)|Eiffel]] * [[Fortress (programming language)|Fortress]] * [[Kotlin_(programming_language)|Kotlin]] * [[Mercury (programming language)|Mercury]] * [[Oxygene (programming language)|Oxygene]] (formerly Chrome and Delphi Prism<ref>{{cite web | url=http://edn.embarcadero.com/article/39398 | title=Write Cleaner, Higher Quality Code with Class Contracts in Delphi Prism | publisher=Embarcadero Technologies | access-date=20 January 2016 | author=Hodges, Nick | archive-date=26 April 2021 | archive-url=https://web.archive.org/web/20210426163433/https://edn.embarcadero.com/article/39398 | url-status=dead }}</ref>) * [[Racket (programming language)|Racket]] (including higher order contracts, and emphasizing that contract violations must blame the guilty party and must do so with an accurate explanation<ref>Findler, Felleisen [http://www.eecs.northwestern.edu/~robby/pubs/papers/ho-contracts-icfp2002.pdf Contracts for Higher-Order Functions]</ref>) * [[Sather]] * [[Scala_(programming_language)|Scala]]<ref name="scala-assertions-dbc"> {{cite web | title = Scala Standard Library Docs - Assertions | publisher = EPFL | url = https://www.scala-lang.org/api/current/scala/Predef$.html | access-date = 2019-05-24 }} </ref><ref>[[Strong typing]] as another "contract enforcing" in Scala, see discussion at [https://www.scala-lang.org/old/node/6958 scala-lang.org/].</ref> * [[SPARK (programming language)|SPARK]] (via [[static code analysis|static analysis]] of [[Ada (programming language)|Ada]] programs) * [[Vala (programming language)|Vala]] * [[VDM specification language|VDM]] Additionally, the standard method combination in the [[Common Lisp Object System]] has the method qualifiers <code>:before</code>, <code>:after</code> and <code>:around</code> that allow writing contracts as auxiliary methods, among other uses.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)