3 ms·
Could those be specified in comments in the file? Most development nowdays is done in an IDE that could intelligently "hide" the comments when you're just readi
by sounds 12y ago
Could those be specified in comments in the file? Most development nowdays is done in an IDE that could intelligently "hide" the comments when you're just reading the code, and then when you're looking at optimizing the code you could start annotating things that way.
A similar approach is to use #pragma directives, though many languages do not have an analogue to that.
Java Annotations are probably wrong. The compiler can benefit from more freedom (and finer grained detail), so for Java comments seem like a better choice to me.
- sukilot 12y agoWhat can comment say that an annotation could not? Heck, annotations can contain text strings.
- sounds 12y agoDo you mean Java annotations?
- loup-vaillant 12y agoI believe it's a question of where you put the optimisation hints. Alongside the code, or in a separate file?