3 ms·
rust panics when out of memory, that would not be acceptable to sqlite3.
by andrewchambers 9y ago
rust panics when out of memory, that would not be acceptable to sqlite3.
- steveklabnik 9y agoThe Rust language knows nothing of dynamic allocation. You're speaking of the behavior of the standard library, which is trivial to drop. You're free to have whatever allocator semantics you want, including robustness on OOM.
- pornel 9y agoSteve, you usually give better answers. Invoking the distinction between Rust-as-defined and Rust-as-commonly-used feels like language-lawyery dodging of a real issue. Suggesting to drop all of std just to customize just one feature of the allocator it is not a good solution. You should know harsh OOM handling is a problem for Rust users, and there's work being done to improve it.
- steveklabnik 9y agoWell, suggesting that Rust inherently has this problem is mis-representing the situation. And while it's true that lots of people use std, many people also don't, and especially the people that care most about this aspect of Rust. > You should know harsh OOM handling is a problem for Rust users A small number of people have this issue. It barely even applies on entire operating systems, for example. That said, custom allocators will be nice.
- andrewchambers 9y agoFair enough, I guess for a project like sqlite rewriting some custom data types is no big deal.