My guess is that C# will be much better, since it has support for Value types.
Wasn't Java supposed to get support for Value types some time ago?
Wasn't Java supposed to get support for Value types some time ago?
Nullable<T> itself is not exactly the same as Option<T> since it does not cover types that already allow nulls. It adds nulls rather then removing them.
Many people roll their own Option<T> or Result<T,E> type, since it's easy enough to start, and it's usually a class type.
1) https://learn.microsoft.com/en-us/dotnet/api/system.nullable...
2) https://github.com/mcintyre321/OneOf/blob/master/OneOf/OneOf...
https://sharplab.io/#v2:EYLgtghglgdgNAFxBAzmAPgAgLACgACATAMx...
sum += things[i] ?? 0;