Counting Sheeps with Contracts in Python
colorsofcode.ghost.io
Counting Sheeps with Contracts in Python
1–10 of 19 posts
Re: Counting Sheeps with Contracts in Python
#2This first post is about counting sheeps, with a design-by-contract twist.
Let me know what you guys think, it's my first blog at all, so I'm a taker for all matters of feedback, as long as it comes from the heart that is ;)
Re: Counting Sheeps with Contracts in Python
#3Re: Counting Sheeps with Contracts in Python
#4This isn't meant as a dig, I'm genuinely curious: how is this not simply imposing static typing in python?
Re: Counting Sheeps with Contracts in Python
#5Re: Counting Sheeps with Contracts in Python
#6What is the performance hit like? I could see these getting pretty expensive (but correctness is invaluable). Seems like it would be great for something like aws lambda in python where you have already decided performance isn't an utmost priority and scrutability is difficult, so any correctness you can bolt on is a boon.
Re: Counting Sheeps with Contracts in Python
#7[1] https://en.wikipedia.org/wiki/Eiffel_(programming_language)
Re: Counting Sheeps with Contracts in Python
#8At this point just use Java instead.
Re: Counting Sheeps with Contracts in Python
#9This isn't meant as a dig, I'm genuinely curious: how is this not simply imposing static typing in python?
Re: Counting Sheeps with Contracts in Python
#10I 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!