> 20 years ago there were no generics, so you couldn’t have implemented it that way. You could have written a class OptionalLong
That was the actual reason, yeah. Basically having to make IntList and so on.
> Java’s tradeoffs are maintainability in huge teams over multiple years with relatively fast performance
When I did switch to C# in 2003, it was very young. Since then generics have been bolted on and so on, but I didn't find any hit to maintainability due to this. What I do think was sad though is that when Generics were bolted on (and value types obviously were there all along), that the APIs didn't immediately include some easy and obvious wins like Option<T>. Those have been reimplemented since ad nauseam.