[sc34wg3] CTM: Semicolons
Lars Marius Garshol
larsga at garshol.priv.no
Wed Feb 4 05:25:28 EST 2009
* Lars Heuer
> Ha, ha. I'd like to kick semicolons, but I understand the comments I
> received from the tutorial. These comments are somehow aligned to the
> "Don't make me think"-principal: [...]
Like the others I definitely agree with that principle. (A principal
is a person.)
> The user has to remember to add a semicolon after a template
> invocation within a topic-block but she must avoid that semicolon if
> the invokes a template outside of a topic-block. This could be
> strange to explain.
If you explain it like that, yes. However, the rule I was proposing
was "semicolons between statements, and nowhere else". That, I think,
doesn't require any more thinking.
> The problem is, as you've pointed out, that the semicolons were
> introduced artificially. There was never a technical need for them. If
> we'd have a technical need, it would be very easy to decide where to
> put semicolons and where to leave them out.
> Due to our change of the mergemap-directive it requires a semicolon
> now and it makes sense (even if I think a dot ('.') would fit better).
> Further it makes sense to align the the syntax of the other directives
> that they require a semicolon otherwise the user would be confused.
Yes, although there's probably a way to avoid that, if we want to.
> I have to admit that I am a bit stuck with the semicolon issue. I
> don't know which way to go. Either input from the semicolon-lovers
> would be good or a hint from the community would be helpful.
I think it's important to have some clear alternatives to choose
between. To me it looks like we've got
(1) Semicolons everywhere (although not after the topic identity).
This is the syntax that's currently in the CTM test suite.
(2) Semicolons between statements only.
However, as you point out, (2) is not fully realized yet, because it
requires us to rework the mergemap directive slightly to get rid of
the need for the semicolon there.
We could do that by:
(a) Requiring the notation. Not ideal, but certainly workable.
(b) Putting the notation before the IRI.
(c) Adding some form of bracketing around IRI and notation, like so:
%mergemap ( foo.ctm )
So that gives us four alternatives (1, 2a, 2b, 2c), at least.
More information about the sc34wg3