3 ms·
> some very unreasonable design decisions (namely, each future generates as the result of a computation on a previous future has a different type, even if they
by dbaupp 9y ago
> some very unreasonable design decisions (namely, each future generates as the result of a computation on a previous future has a different type, even if they resolve to the same types upon evaluation of the future - basically abusing the type system to store the futures chain
If you don't need the performance, you can get back to the dynamic-language world by boxing everything (.boxed()). The generics approach lets everything be compiled down to a single state machine, exactly like Iterator.