3 ms·
1. It doesn't look like a comment, so it's less confusing to people new to the language 2. It allows the programmer to skip comments entirely, when reasoning a
by MaxBarraclough 6y ago
1. It doesn't look like a comment, so it's less confusing to people new to the language
2. It allows the programmer to skip comments entirely, when reasoning about program behaviour
3. You can write comments without fear of the comment changing program behaviour (probably of little concern in practice, but still)
Putting directives in comments is always a hack. C and C++ get this right, with #pragma.
- throwaway894345 6y agoThese don’t seem like remotely significant issues, especially given how infrequent these directives are.
- yencabulator 6y ago> 3. You can write comments without fear of the comment changing program behaviour (probably of little concern in practice, but still) There's historical exceptions, but the new rule is this: Comments begin with "// ", pragmas don't have that space.
- breakingcups 6y agoCan you not see how that just amplifies the potential for confusion and bugs?
- saturn_vk 6y agoYou also get no completion help from the language server since you are in a damn comment
- MaxBarraclough 6y agoThat's another good point.