2 ms·
That is true! You're right that the perspective can be different. You could write <T: Into<Option<i32>> if you wanted, and your callers wont change. Frankly,
by steveklabnik 6y ago
That is true! You're right that the perspective can be different.
You could write <T: Into<Option<i32>> if you wanted, and your callers wont change.
Frankly, using options as parameters is just not generally good design, so this issue doesn't really come up very often, in my experience. There are exceptions, but it's exceedingly rare.
- mkesper 6y agoFrankly, using options as parameters is just not generally good design That's true. Even in annotated Python, I want to ensure all parameters are set before calling my functions/methods. Saves a lot of complications.