3 ms·
> However Go benefits from the Garbage Collector here - I totally understand why Rust libraries don't want to return heap allocated errors. This doesn't have t
by pcwalton 10y ago
> However Go benefits from the Garbage Collector here - I totally understand why Rust libraries don't want to return heap allocated errors.
This doesn't have to do with the GC or lack thereof. Instead it's part of the philosophy of zero-cost abstractions: idiomatic C libraries don't require heap allocations to return errors, so neither does Rust.