next up previous
Next: The compiler
Up: The WOM language
Previous: Running WOM stand-alone

A comment on language design

One construct found in several other Web-authoring tools, and notably lacking in WOM, is a standard conditional. From experience with such tools, one might expect to find a construct like

<If $input~getValue=0>
  The input is zero
  The input is non-zero
which would display one of the two strings depending on input~getValue. Instead, as Section 2.12.3 shows, one has to play around with hiders.

My reason for this is that it simplifies the semantics and avoids some tricky questions. WOM is object-oriented, with instances being embedded in pages: that seems essential, given the job it is to do. When constructs such as the conditional above start mixing with objects, we immediately face problems. For example, if one of the branches contains an instance, should it exist all the time, or be created every time the condition for that branch becomes true? A looping construct would pose such problems even more severely. Consequently, I have stuck rigorously to an object-oriented basis for WOM's semantics. Given that, it would then be possible to add certain abbreviations, with a secure understanding of what they mean when expanded out.

Jocelyn Ireson-Paine
Fri May 30 14:03:06 BST 1997