-10
Writing Comments Is Lazy Coding (javascript.plainenglish.io)
submitted 11 months ago by [email protected] to c/[email protected]

Andrez Sainz de Aja writes that comments are a code smell: they make us lazy. Instead of using comments to convey intent, the coding should. But that is hard, so it is easier to write dumb coding and just put the intent into comments.

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 0 points 11 months ago

From the perspective of maintenance and technical debt: yes, you do want your code to be as clear as possible. But some languages, like assembler and mindfuck, simply weren't designed to be semantically expressive. Assembler clearly states what is happening but not why. And mindfuck is created to be as hard to parse by humans as possible. Without a description of why things exist or what they should be doing, you're going to have a bad time.

this post was submitted on 24 Oct 2023
-10 points (8.3% liked)

JavaScript

138 readers
1 users here now

A community to discuss all things JavaScript (and related areas, i.e. TypeScript)

founded 1 year ago
MODERATORS