upvote
"Fun fact", it lets you largely circumvent the borrow checker by creating arbitrary lifetimes: https://news.ycombinator.com/item?id=48974824
reply
People are so funny about rust.

“Safe rust isn’t expressive enough!” -> then use unsafe rust.

“Unsafe rust lets you do anything! Even crazy things!” -> then use safe rust. Or just don’t write crazy code?

Does bun actually do anything insane like that in its unsafe blocks? Or are you just fear mongering?

reply
Please try to interpret comments in the context of the discussion, not floating freely in a vacuum. The context of the discussion is the Bun port's excessive use of unreviewed unsafe blocks. unsafe in Rust can easily be misused to create Undefined Behavior, which renders any safety guarantees otherwise ensured by Rust's borrow checker invalid.

> Does bun actually do anything insane like that in its unsafe blocks?

Who knows? At 10k unreviewed uses of unsafe, I'd guess there are quite a few incorrect ones. LLMs don't produce perfect code (neither do humans), so there's a high probability that at least some of those create UB.

reply
> Does bun actually do anything insane like that in its unsafe blocks?

How would anyone even know, it's vibe coded.

reply
[dead]
reply