4 ms·
I like having a semantic difference for async values (maybe not computed yet) and for optional values (maybe no value). Thus you get Future<Optional<T>>. It is
by BlackFly 7y ago
I like having a semantic difference for async values (maybe not computed yet) and for optional values (maybe no value).
Thus you get Future<Optional<T>>. It is of course helpful since the "Do this when a value happens, do that when a failure happens" algorithms can be encoded onto the future. Obviously you don't want people implementing busy waits.
Edit: as to your overall point, I agree that this just cannot be modeled with null. The intention is just not capturable.