Languages need comments
October 26, 2006
Through various experiences, I have come to a modest conclusion about designing languages:
And I do mean every language. Even things that are barely programming languages, like configuration files and dinky templating systems, need comments. Sometimes I think that these tiny languages especially need comments; because they are so small and constrained, the tricks you do are likely to be even more obscure and hard to follow.
Yes, this means that I'm falling down on the job with DWiki's template syntax. The real irony of this is that I've had a syntax for comments picked out for some time and adding it to the code is totally trivial, but I just haven't gotten around to doing it. Partly it's because I don't have much enthusiasm for adding comments to the current templates, so I'd either be adding something I won't use or something that will make me feel guilty about undone work.
In theory templating systems that produce HTML can just include HTML comments, but that winds up with the HTML pages that are served to users having all sorts of peculiar internal annotations in them. I am kind of fussy about serving neat, nicely formatted HTML to visitors, even if it's automatically generated, so this makes me cringe. (Some people will also consider it a security hazard, but I'm not that paranoid.)
Written on 26 October 2006.
* * *