Closed penglei closed 3 weeks ago
Hmm, field without definitions are a bit in a grey area, but in the end it makes sense that as a user you don't care about those subtleties, what you want is to just get a definite value no matter what's in the record.
Giving a default value when the field is there but doesn't have a value is also the current behavior of the ?
operator in patterns, so it's one more reason to be consistent and apply that behavior to get_or
as well.
Describe the bug
I think
std.record.get_or "a" true {a}
should also yield true.