Hacker News new | ask | show | jobs
by lmeyerov 640 days ago
One of the most 'nice' thing about contract systems is automating blame checking in higher-order code. They handle the lambda/method param wrapping and blame direction assignment for you, which is annoying to do via manual assertions.

I didn't see a link to DBC, is that in there? Or some other use of contracts that is hard via just asserts, like in test amplification?

We are always looking for ways to improve our Python codebase, and I hadn't expected to see modern investment here!

1 comments

It's at the end of the article in one of those "card" links.

https://gitlab.com/leogermond/python-dbc

Ah yeah unfortunate, afaict it does not (yet?) support lambdas, which is where imo this starts supporting flows that are hard via manual asserts

I was hoping something like a more modern https://dl.acm.org/doi/10.1145/581478.581484