[sc34wg3] CTM: Semicolons
db3000 at mac.com
Tue Feb 3 20:37:23 EST 2009
On 29-Jan-09, at 1:05 PM, Lars Heuer wrote:
> Hi Lars,
>> I don't think this is a good idea. The "end" already terminates the
>> template definition. There's no need for anything further.
>> The reason Pascal has a semicolon there is that in Pascal a block is
>> just another kind of statement. So the reason you need semicolons
>> after blocks is that you need them after all statements. That doesn't
>> apply in CTM.
> Yep, but at TMRA'08 I gave a CTM tutorial  and here is the list of
> the most asked questions:
> - Do we need semicolons at all?
> - Can we make semicolons optional?
> - If semicolons cannot be optional, shouldn't every statement end with
> a semicolon (template calls, associations etc.)
> Since the committee insists on semicolons, we need semicolons and
> since the committee thinks we shouldn't make semicolons optional, I
> tend to agree that every statement should end with a semicolon just to
> be consistent.
I would recommend to look at different approach which is rooted in
In Prolog, each main statement (fact or rule) must have "." at the end.
From my perspective, topic blocks and association/template invocations
outside of topic blocks are "main" CTM statements, so they should
be ended with "."
";" should be used inside of topic blocks only, because ";" separates
assertions inside of topic blocks (by definition)
So it should look like this
- "White Album;
descr: " The White ......".
- "The Beatles".
music:WhiteAlbum isa music:Album.
created(creator: music:The-Betales, work: music:WhiteAlbum).
If we continue analogy with Prolog then our special agreement on
'isa' and 'ako' looks quite... special
Why not to allow for templates which define binary associations follow
'isa' and 'ako' route?
More information about the sc34wg3