4 ms·
Java has had such kind of tooling as addon, thing is most folks don't care. https://objectcomputing.com/resources/publications/sett/september-2011-design-by-co
by pjmlp 2y ago
Java has had such kind of tooling as addon, thing is most folks don't care.
https://objectcomputing.com/resources/publications/sett/september-2011-design-by-contract-in-java-with-google https://objectcomputing.com/resources/publications/sett/sept...
C++ contracts might finally land in C++26, after missing two revisions, although in a minimal form.
- mrkeen 2y agoIt's because runtime checking is trivial. We can all code up something to crash-if-condition, or except-if-condition, or log-if-condition.
- Joker_vD 2y agoWe can, yes, but we also can forget to code any such condition as well, which is all too common. And for e.g. C the lack of an explicitly supplied by the programmer runtime-check is exactly equivalent to the programmer explicitly stating and pledging that such runtime-check is entirely unnecessary, and even it's trivial to statically check at compile time that this pledge is in fact false, no diagnostics is required.
- imtringued 2y agoThey didn't provide a model checker to accompany the contracts the library provides. No integration with Java Pathfinder or JBMC? It's really weird how much they missed the ball. https://en.wikipedia.org/wiki/Java_Pathfinder https://en.wikipedia.org/wiki/Java_Pathfinder https://www.cprover.org/jbmc/ https://www.cprover.org/jbmc/