logoalt Hacker News

Joker_vD • yesterday at 12:41 PM • 1 reply • view on HN

> I have no wishes to think about custom memory allocators. I don't want them. I consider those as unnecessary complexity for a niche use case,

Well, not to be rude, but Python and Go exist, you know. But if you're picking Rust (or Zig) — you will have to think about lifetimes, ownership, and allocations, that's the language's raison d'être.

> with features to please everyone and a lack of simplicity.

Like async! Compared to that barrel of worms, the new allocators are a complete non-issue. A two-functions trait, that Vec's and Box's "new_in" method use under the hood, with straightforward semantics — that's as complicated as having xmalloc()/xfree() in your C project.


Replies

speedgoose • yesterday at 1:17 PM

That’s rude.