I see mypy more as a refactoring tool, but I'm always pleasantly surprised when it catches issues. It caught a bug here!
demo.py:96: error: Unsupported operand types for >= ("int" and "Optional[int]")
(In the code I've checked max_val is not None, but used min_val.)
miniblog.
Related Posts
comptime generics in Zig and template style generics (checked at the call site) versus concept style generics (checked at the definition site):
Which Rust libraries are the most "business-y"? A fun analysis that compares weekday download rates with weekend downloads: https://old.reddit.com/r/rust/comments/nsvyxq/what_are_the_most_professional_crates/
checked_int_cast is used more on weekdays, whereas cpp_syn is used more at weekends. Not sure what to conclude there.
Interesting to see that Swift has adopted checked exceptions: https://docs.swift.org/swift-book/LanguageGuide/ErrorHandling.html
I haven't seen many languages favour this feature after Java practices have gradually moved away from it.
