Legal Contracts Written in Code
The SEC is considering mandating that Python be used to express certain financial contracts, allowing the potential buyer to ‘programmatically input the user’s own assumptions regarding the future performance and cash flows from the pool assets, including but not limited to assumptions about future interest rates, default rates, prepayment speeds, loss-given-default rates, and any other necessary assumptions.’
I love this idea!
Contract disputes, which unfortunately crop up every once in a while when you’re a consultant, are horrifically expensive to adjudicate, because both sides invariably interpret some definitions in different ways and dispute which clauses have precedence.
Oh how I’d love to have a contract whose appendix was the behavior-driven steps of the various Cucumber-defined clauses!
Feature: Automated Resolution
In order to avoid expensive litigation
As a contract signatory
I want to resolve disputes using a mechanical method
Scenario: Invoice dispute over unsatisfactory work
Given contractor submits an invoice in the amount of $100
And Contractee finds that work is unsatisfactory
When Contractee disputes invoice
Then the dispute shall be resolved by The Contract Program
Not that this would magically make contract disputes go away, but I can imagine it helping. At least until someone builds a recursive clause-defining clause and makes a Turing-complete Contract Program and then defines a non-computable contract.

Of course we’d have the same “qui custodiet” problem that we do with automated tests. With my luck, I’d be the one to write the contract with the fencepost error that mandates me paying the customer a $5,000 fee, every February 29 unto eternity.
That said, it sure would be nice to be able to test contracts with code instead of with courts. The latter has way too slow an edit/test cycle.
Just when you thought all possible programming specialization niches had been thought of: “Automated Contract Test Developer”.
This smacks of Accelerando by Charlie Stross. He used python for this too.
Next step: weakly godlike cats and info-slug parasites!