-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default #19
Conversation
That was before @dns2utf8 added the |
Can you see it 😉 |
Maybe derive it for all spaceapi types as well? Otherwise there is little use for it. |
Default for location: pub struct Location {
address: Absent,
lat: 0.0,
lon: 0.0,
} The 0.0 doesn't look useful to me. A latitude or longitude does not have a good default. |
Yeah but for some of the types it may be useful. |
Alright, but we can only implement it for leaf types, not for types that contain other types that don't implement |
0.0 / 0.0 is a common default for long / lat, looks ok to me |
But does it make sense semantically? That location is somewhere in the Gulf of Guinea in the Atlantic Ocean. Does it make sense to default a location to the Gulf of Guinea? I think not. |
You could default it to NaN... |
good point |
We can't override Default for |
11a98ea
to
fc9da2a
Compare
However, I think the Default implementation for Optional is OK like that. |
Implement
Default
forOptional
as discussed in #6.