Findfirst for Dicts with `nothing` keys

This is incorrect. We optimize away tuples all the time. I don’t recall seeing a proposal to return a tuple with a found flag — did I miss it? If we’re going to “wrap” the result in some way, we could use Some(x). For many people, the primary API concern is that they do not want to have to manually unwrap values to use them. But I agree found, val = findfirst(...) doesn’t seem so bad.

1 Like