News for hackers. Stuff that matters.
Re:Optional If Expressions by _flux on Sunday April 16, 2023 @07:29AM (#35589077)
Currently we can write

    fn foo() -> () {}
And it returns an instance of (). I guess the same mechanism could be generalized for any value with, like you said, a trait like MissingValueDefault. That would then also work with the omitted else branch.

I'm not sure if there are some difficulties in calling different code based on type inference results, though. Are there other situations where that happens?

There are no comments on this comment yet.