3 ms·
There's a very special level of hell for people who use both Optional.empty() and (Optional<?>) null for different things.
by erik_seaberg 7y ago
There's a very special level of hell for people who use both Optional.empty() and (Optional<?>) null for different things.
- chii 7y agoJust to play the devils' advocate, what happens if you want to represent the absence of having a value? that is, the Optional is not None (because it hasn't been computed yet).
- erik_seaberg 7y agoSpecial. Hell. (Actually that sounds like a Future<Optional<T>> or something.)
- swish_bob 7y agoIf you create a null reference to an Optional in any code base I have to deal with I will hunt you down and hurt you.
- MockObject 7y agoNo jury of peers would convict.