I've always wanted to work with a language that supports contracts (originally Eiffel I guess). Would love to see this hacked into Go. Or maybe I shouldn't turn this into a Go thread and start using Cobra.
If you work with .net, the code contracts project[1] is halfway there: It's quite ugly and they made some design decisions I don't agree with (for the wrong reasons, i guess...), but it has had a tremendous impact on the quality of my code.
There have been a few attempts to hack (design by) contracts into Perl. Here are some which can be found on CPAN:
* Class::Agreement - https://metacpan.org/module/Class::Agreement
* Class::Contract - https://metacpan.org/module/Class::Contract
* Sub::Contract - https://metacpan.org/module/Sub::Contract
Sub::Contract is my favourite because it's lightweight, pragmatic & with a more Perlish implementation.