{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreifnzskkawezfsmjqp4zuwrncvgd6prc6jjlf7gsmm72kpmk2b2ahi",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mh2iv5qg5432"
},
"path": "/t/idea-pre-rfc-null-free-pointer-and-zeroable-reference/23991?page=7#post_129",
"publishedAt": "2026-03-14T21:11:36.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "I think one of the issues with this assertion is that you're trying to directly port an already-hand-optimized C solution to Rust.\n\nIf it doesn't port well, it doesn't mean that the problem this solution solves has no effective and efficient solution in Rust. It means that the specific C solution can't be ported.\n\nThere are other data structures you might be able to use for the task at hand, which you will certainly be able to write in Rust. And you might be able to hand-optimize those (which are now idiomatic Rust) down to something that satisfies your performance constraints.\n\nBasically what I mean by this is that this C code is certainly a local optimum (otherwise it would've been further optimized, no doubt). And not being able to port it exactly to Rust will incur in higher performance costs, perhaps going outside the viable range for your needs.\n\nBut for that same reason, what you perhaps need is to think of how to solve this problem from Rust and optimize those data structures from that standpoint. You will reach local optimums which are better suited for your Rust solution than this particular optimum that cannot be ported.\n\nOr in other words: perhaps you never needed to store things inside the zero pointer.",
"title": "Idea / Pre-RFC: Null-free pointer and Zeroable reference"
}