3 ms·
// I use the syntax for single-line comments // even for multi-line comments, // so that it's easy to temporarily comment out // a block of code
by combatentropy 8y ago
// I use the syntax for single-line comments
// even for multi-line comments,
// so that it's easy to temporarily comment out
// a block of code
- D-Coder 8y agoFound somewhere: Comments are called for! Why not in haiku format? That will keep them short.
- yawaramin 8y agoIsn't it easier to put /* and */ around the block than to put // at the start of every line?
- SenHeng 8y agoMost editors have a simple shortcut that adds // to each sentence in a block. It's faster when you want to uncomment certain lines in between instead of having to update the comment blocks every time.
- speedplane 8y agoThe problem with block comments (e.g., /* and */) is that when you nest them inside eachother, it's not always obvious what should happen. Of course, you shouldn't do this anyway, but line-style comments removes this vector of issues.