Personally I like the idea. It actually allows the...
# language-proposals
r
Personally I like the idea. It actually allows the caller and callee to be more explicit about intent -- @ean5533 solution requires the param to be made nullable, which isn't really the intent of the callee. The true intent of the callee is: this value is required, but I'm gonna default it to
x
if not provided, and that is encoded explicitly in the signature. With @kevinmost's idea, the caller can now also explicitly say "I'm gonna use this value if I have it, otherwise go ahead and use whatever default the callee has defined".