> Keep in mind that some types may be complex (e.g. when using generics)
That's exactly why I'm not fond of the question mark, that already has an overloaded meaning in generics. Foo<Bar>, Foo<?>, Foo<Bar?>, Foo<? extends Bar>, Foo<? extends Bar?> look pretty confusingly similar. One could argue that ? and * were terrible symbols for use in generics in the first place, but that ship has sailed.
I'm sure people (myself included) could easily get used to the syntax, but habituation is not going to stop me from being grumpy :-)
That's a good point, though I would argue that this is caused more by the ? in <? extends Bar> than the ? of the nullable type.
I've always found the "? extends" syntax to be confusing, and I feel like the question mark doesn't even need to be there on a syntax level. I also feel like on a language level, Java shouldn't even need a "? extends Bar", but unfortunately Java's generics system isn't strong enough to work without it.
And then it gets worse, with Foo<?> and Foo<? extends Object> being slightly different, even though it makes no sense at all.
That's exactly why I'm not fond of the question mark, that already has an overloaded meaning in generics. Foo<Bar>, Foo<?>, Foo<Bar?>, Foo<? extends Bar>, Foo<? extends Bar?> look pretty confusingly similar. One could argue that ? and * were terrible symbols for use in generics in the first place, but that ship has sailed.
I'm sure people (myself included) could easily get used to the syntax, but habituation is not going to stop me from being grumpy :-)