Wandering Thoughts archives


Languages need comments

Through various experiences, I have come to a modest conclusion about designing languages:

Every language, be it ever so tiny, needs to have a way of including comments.

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.)

programming/LanguagesNeedComments written at 22:47:32; Add Comment

Page tools: See As Normal.
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.