On Sun, 8 Aug 2004, MenTaLguY wrote:
A traits specialization is not going to change unless the primary class does (and seldom even then), and the addition of new specializations is a fairly rare occurrence.
They certainly do serve a documentation role as well.
For the most part better served by a comment.
Comments also cause recompilation. Do they belong in a separate header?
I guess that's actually a serious question. Recompilation times have discouraged me from going back and commenting sometimes when I felt lazy. I believe Doxygen permits documentation in separate headers or in the .cpp file.
On the other hand, that may mean fewer people read the comments.
Documenting the .cpp file probably makes better sense than moving it to a separate file, if the name of the game is keeping the comments updated.
Really, though, the true solution is to find ways of better isolating interfaces between subsystems, forward declarations, and other such techniques for cutting down the include hierarchy. Pondering about comment location seems like a micro-optimization twiddle. ;-)
I think if AST and the extensions are done well, we may be able to make some serious inroads into the recompilation trouble.
Although I wonder if the simplest solution to the problem would be to take up a collection to get Mental a faster computer. ;-)
Bryce