by lacampbell · 9y ago · 0 comments
String id = order.map(o -> o.Customer).map(c -> c.Id).orElse("INVALID");
The Java code is actually shorter and works straight out of the box, so I don't know why you're calling Optionals "verbose".I think that was the point he was making, that it's always been possible, and now is simple.
string? id = "Name";
While you can do stuff like this: int x = 0;
int? y = x;
Again, F# has nullable types and options, and the fact that no one in F# uses nullable types should tell you something.