Re: [VE][388] Error Message Feedback

On Sat, 13 May 2006, Michael Adams wrote:

>> (On the other hand, why don't you just remove the comment? If your
>> HTML markup "needs" a comment, the odds are that it is too artificial
>> and should be restructured. Comments considered harmful.)
>>
>
> Ok, Jukka, I'll bite. Why are comments considered harmful?

Lots of reasons, one of which I mentioned: people use them to maintain the 
illusion of understandable code, instead of using logical and 
understandable code (markup). HTML is not programming, and markup should 
describe the logical structure of a document, instead of itself needing 
some descriptions and explanations.

Moreover, comments lead to trouble (as in this question) due to the 
complexity of SGML comment rules; they increase the HTML document's size 
and therefore transfer time each and every time the document is requested; 
they often present metadata (e.g., authorship information) that should 
appear either as part of visible content or in a more structured way in 
elements (e.g., <meta> elements); and they are often simply wrong, as 
comments often are (since people edit the code but forget to edit the 
comments).

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Saturday, 13 May 2006 12:53:43 UTC