3 ms·
Right, duplicating every method that allocates also isn't very elegant. But could Box and containers be polymorphic on an OOM handling trait? Alternatively, o
by acconsta 11y ago
Right, duplicating every method that allocates also isn't very elegant.
But could Box and containers be polymorphic on an OOM handling trait?
Alternatively, one could imagine an OOM-safe container that returns results, and a convenience wrapper class that unwraps them. That might harm efficient code generation though.