3 ms·
1. The magic comments are specific to which analysis tool you're using, so don't work well with portable code. 2. Those magic comments are put in the source co
by WalterBright 9y ago
1. The magic comments are specific to which analysis tool you're using, so don't work well with portable code.
2. Those magic comments are put in the source code, meaning they uglify the code in github, etc.
Of course, one could create a separate database for the annotations, but that adds another layer of complexity for the users to prevent its use.
- Klathmon 9y agoI disagree. They are as portable as the code is, yes they might only work with a single language requiring another "format" for other linters in other languages, but they will stay with the code wherever it goes. And they aren't "uglifying" the code any more than type annotations or variable names. They are an additional hint to the user and the system about what a specific line or block of code is doing. They are just an annotation that the compiler ignores (for the most part).