Title is sort of clickbaity, as the article is about implementing said "impossible" optimization in Rust. I wasn't sure what a good alternative title would be, though, if this is one of those cases where using an alternative title is acceptable. I'm open to suggestions!
No, this idea that unsafe blocks “are not rust” is wrong. Getting unsafe correct is hard, and so needs to be approached with care and first time buyers would do well to get advice from a friendly neighbor, but it’s a normal solution to some rare (code volume wise) cases. The best practice is to always document the safety constraints and reasoning above the blocks and some crate attestations will not be granted without those.
I love the concept so much. For me it just means “this block lacks a number of guarantees. Review it (and test it if you’re the author) far more carefully.”
The OP links to a quote where somebody else calls this "impossible in rust". That link makes this a valid title. Clickbaity, like good titles in 2024 are.
The quoted optimization in the post isn't about German strings though, but the C++ style short string optimization (the post references an article describing the difference). A few of the referenced crates do this optimization so the blog is still right to point out that it's completely possible, I just wish it was clearer what optimization they felt was being claimed to be impossible.
Title is sort of clickbaity, as the article is about implementing said "impossible" optimization in Rust. I wasn't sure what a good alternative title would be, though, if this is one of those cases where using an alternative title is acceptable. I'm open to suggestions!
I mean, they weren't wrong if they meant "safe rust only" - so the title is still kind of correct right?
No, this idea that unsafe blocks “are not rust” is wrong. Getting unsafe correct is hard, and so needs to be approached with care and first time buyers would do well to get advice from a friendly neighbor, but it’s a normal solution to some rare (code volume wise) cases. The best practice is to always document the safety constraints and reasoning above the blocks and some crate attestations will not be granted without those.
I love the concept so much. For me it just means “this block lacks a number of guarantees. Review it (and test it if you’re the author) far more carefully.”
Which suggests the solution of changing the title from "impossible in rust" to "impossible in safe rust".
The OP links to a quote where somebody else calls this "impossible in rust". That link makes this a valid title. Clickbaity, like good titles in 2024 are.
The quoted optimization in the post isn't about German strings though, but the C++ style short string optimization (the post references an article describing the difference). A few of the referenced crates do this optimization so the blog is still right to point out that it's completely possible, I just wish it was clearer what optimization they felt was being claimed to be impossible.
How much time would it take to port RocksDB in Rust hypothetically.