Hacker News new | ask | show | jobs
by potatolicious 4926 days ago
Not to mention code is imperfect. My main platform is Obj-C/iOS and there are numerous API bugs, workarounds, and bits of ugliness involved when integrating with third-party APIs and libraries. These definitely involve comments because they are incantations that have a reason for existing, where the reason is entirely non-obvious on examination.

God help the guy who rips out a seemingly innocuous line of code only to subtly break things underneath. Even a simple:

    // Hack around time parsing bug in iOS3+, see [StackOverflow thread]
saves hours of lost productivity.

We can get rid of comments the moment we invent a perfectly expressive language, where every single line of code in your entire stack is under your control and everything works exactly as advertised out of the box.

Until then, I'll keep commenting where I need to, and never when I don't.