Hacker News new | ask | show | jobs
by onion2k 5 days ago
A bug is a feature that does what the code says it should do, not what the requirements say it should do (or shouldn't in the case of most bugs). When you understand that there's no difference between a bug and a feature in the code. They're both just code.

It's a correct statement, but when you're talking about memory safe languages it's true that memory safety helps you avoid writing code that doesn't do what you were expecting, so I'd still suggest memory safety matters for reducing the number of bugs.

1 comments

> A bug is a feature that does what the code says it should do, not what the requirements say it should do (or shouldn't in the case of most bugs). When you understand that there's no difference between a bug and a feature in the code. They're both just code.

You're twisting very hard the definitions here. A bug is a behaviour different than the one intended, it is not tied to code whatsoever. You can have bugs "in the code" that happen because of faulty hardware, or a solar flare.

Unless you work in an industry where solar flares should be taken into consideration, the code and requirement can match and you still have the (protential) bug