What is the meaning of #XXX in code comments?

XXX in a comment is usually a heads-up. It could be: Something that’s not implemented completely correctly. Something that should be fixed later on. Highlighting a possible problem spot. Something you’re not sure about, a question. I’ve often preferred a more descriptive tag like FIXME or TODO or HACK. XXX is often used as a … Read more

Where is the syntax for TypeScript comments documented?

Current The TypeScript team, and other TypeScript involved teams, created a TSDoc specification. https://tsdoc.org/ Example straight from the docs: export class Statistics { /** * Returns the average of two numbers. * * @remarks * This method is part of the {@link core-library#Statistics | Statistics subsystem}. * * @param x – The first input number … Read more

What is the best comment in source code you have ever encountered? [closed]

I am particularly guilty of this, embedding non-constructive comments, code poetry and little jokes into most of my projects (although I usually have enough sense to remove anything directly offensive before releasing the code). Here’s one I’m particulary fond of, placed far, far down a poorly-designed ‘God Object’: /** * For the brave souls who … Read more

How do you do block comments in YAML?

YAML supports inline comments, but does not support block comments. From Wikipedia: Comments begin with the number sign ( # ), can start anywhere on a line, and continue until the end of the line A comparison with JSON, also from Wikipedia: The syntax differences are subtle and seldom arise in practice: JSON allows extended … Read more