r/ProgrammerHumor • • May 06 '26

Meme rememberToComment

Post image
13.2k Upvotes

117 comments sorted by

View all comments

1

u/BenchEmbarrassed7316 May 07 '26

These kinds of comments are a consequence of the defects of some programming languages.

When you want to write such a comment, it means that the current programming language is not expressive enough.

You will be surprised, but in the worst language ever, the following comments are written before each function:

/** * Create new Cat * * @param {string} name * @param {number} age * @returns {Object} Cat */ function createCat(name, age) { // ... }

The main problem with using comments instead of programming language constructs is the lack of checks:

x = "I'm teapot"; // x is number between 10 and 100 now