|
|
|
|
|
by paledot
2159 days ago
|
|
Good point. My method may behave unexpectedly if you call `sum(true, false)`, but it's not identifiably different than `sum(1, 0)`. Sorry, it was late, and I failed to mention my actual use case: I work on a legacy application and want to enforce correctness on the new code I write. I'd rather write a new module and enforce that the calling code in the legacy app is using it correctly, than try to add strict types to the legacy classes. |
|