Re:Java 8’s new Optional type doesn't solve anything
by peeters on Monday October 26, 2015 @01:03PM
(#10452707)
If you ever have actual success getting developers to obey documented input/output constraints without actually enforcing them with a static or runtime check, you could probably become a highly-paid coach. But I'm skeptical. I've never seen it happen, and most good libraries I've used (e.g. Guava) always follow up preconditions with a runtime check. Statically enforceable pre/postconditions shouldn't even have to be documented because the signature is the documentation.
Good libraries allow their developers to be lazy.