> I mostly agree with this.  HOWEVER, the fundamental problem is that the
> SGML comment syntax definition is broken.

I disagree. Well, to the point that it's not any more broken than most
other commenting mechanisms. If you just look at it through HTML
blinders (especially ad hoc HTML parser blinders), it looks pretty
bad. But that means you're only looking at bad implementations of a
special case of SGML comments.

> It is completely stupid that
> <!-----------------------------------------------------
>   Start of what I thought was a comment block
>   ----------------------------------------------------->
> will commentize vast chunks of the remaining text if I happen to have the
> wrong number of dashes in there.

As opposed to, for instance, the C construct:
	int x, *y ;
	return x/*y ;
Commenting out vast chunks of the remaining text?

> It is completely stupid that
> <!-- this comment -- using a double dash in the conventional way to
>      indicate a parenthetical remark -- trips up the parser -->
> will generate syntax errors in an SGML validator.

As opposed to, for instance the bourne shell construct:
	rm #*
generating an error?

> There is really no decent reason why the SGML comment syntax must be so fey.

Like I said - it isn't fey. It's very straightforward, once you look
at the SGML comment syntax, and not the twisted version you see from
an HTML authors perspective.

> <!-- starts a comment and --> ends it and it doesn't matter how many -'s
> happen to fall in between.

And what do you use for comments inside of markup that you aren't
ready to terminate yet? The HTML sgml declaration contains examples of
this; the HTML 3.0 DTD uses this construct to comment on the meanings
of attributes. Both use it heavily to comment entities. Outside of the
HTML community, the standard case for SGML comments ("--" to "--") are
as heavily used as the MD comments are. You're basically taking the
standard usage away because the special case grates on you and
replacing it with a sanitized version of the special case, while
providing either no replacement or a MUCH uglier replacement for the
standard usage.

Yes, it could be improvied, but you're still going to have problems
like the ones we both quoted.  However, you should START by changing
the standard usage, and fix the special case ("<!--") after you've got
the standard usage done better.

Getting SGML comments right is no harder than getting HTML right.
Arguments that people are having trouble with one so we have to change
it apply equally well to the other.


Received on Wednesday, 15 May 1996 20:34:14 UTC