3 ms·
It is still frustrating to me that C still doesn't have a non-allocating method to handle substring references, which both C++ and Rust have. On the other hand
by estebank 4y ago
It is still frustrating to me that C still doesn't have a non-allocating method to handle substring references, which both C++ and Rust have. On the other hand I see people trying to parse files, like JSON, in a non-allocating way in Rust and hit a wall until they realize that nodes need to be escaped for anything useful, which requires owning the node's memory (meaning, you need a String or at least Cow<'_, str>, can't get away with a &str).