logoalt Hacker News

SuperV1234today at 11:04 AM4 repliesview on HN

> The main problem, however, was code quality.

> The sleight of hand misdirects the reader away from the main way bugs are eliminated: by dedicating engineering resources to it.

Perhaps the amount of bugs comes from using a C-like language that requires meticulous manual care to avoid writing runtime bugs.

Even C++ would be a safer choice because of RAII.

When you have to dedicate significant resources to avoid/fix runtime issues that are made impossible at compile time by other languages, the programmer isn't entirely at fault.


Replies

0x000xca0xfetoday at 11:47 AM

Memory safety problems are still possible in the new Rust Bun:

     At the time of writing, about 4% of Bun's Rust code sits inside an unsafe block (~13,000 unsafe keywords across ~27,000 lines / ~780,000 lines), and 78% of those blocks are a single line — a pointer that came from C++, or one call into a C library.
show 6 replies
geraneumtoday at 1:28 PM

You have to put similar amount of resources when writing in Rust as well. With the difference that it’s more front loaded. Personally I’m a fan of Rust’s approach but the price for having bug free code has to be paid, regardless, one way or the other.

coffeeaddict1today at 11:29 AM

C++ would also introduce a myriad other subtle safety problems that would require years of expertise to even notice.

show 1 reply
skydhashtoday at 11:30 AM

I’ve not seen any languages that does not require meticulous care to avoid runtime bugs. Type checking and lifetime ownership eliminate some, but not all of them.

show 2 replies