[sc34wg3] CTM / TMCL Issue: Wildcards - Do we need them?
Lars Heuer
heuer at semagia.com
Sun May 25 12:24:23 EDT 2008
Hi all, especially TMCL-editors,
The current CTM draft contains *three* mechanisms to create topics
with an automatically generated item identifier.
The anonymous wildcard and the named wildcard were introduced because
TMCL needed them. In Oslo this year we introduced a new notation to
embed topics:
[-"Topic with an autogenerated iid"]
Now, I took a look at the TMCL draft dtd. 2007-12-08 and I wonder if
we need the "?" and "?foo" notation at all; it seems that the []
notation is enough.
A random example from TMCL:
def AssociationTypeConstraint()
?atc1 isa associationtype-constraint
AddConstraintToSchema(?atc1)
end
which can replaced by:
def AssociationTypeConstraint()
AddConstraintToSchema([isa associationtype-constraint])
end
Another example:
def isAbstract($topictype)
?attc1 isa abstract-topictype-constraint
applies-to(*attc1 : constraint-role, $topictype : topictype-role)
AddConstraintToSchema(?attc1)
end
Replacement:
def applies-to($role, $topic)
applies-to(constraint-role: $role, topictype-role: $topic)
end
def isAbstract($topictype)
AddConstraintToSchema([isa abstract-topictype-constraint;
applies-to($topictype)
]
)
end
It seems that every ?foo is replaceable with [] since [] allows a more
complete topic definition.
If ?foo and ? is not needed for TMCL (anymore), I'd be more than happy
if we can remove them from CTM. That would simplify CTM a bit.
Best regards,
Lars
--
Semagia
<http://www.semagia.com>
More information about the sc34wg3
mailing list