[tmql-wg] Proposed requirements: Operations on primitive types
Tue, 22 Jul 2003 17:38:05 +0100
The other consideration that arises is whether a date or number is
treated as a topic or as a characteristic of a topic (an occurrence). I
might, for example, have a topic that is an instance of "birthdate" and
that topic might have an occurrence that is resource data and that is an
instance of "date", alternatively I might have a topic that has an
occurrence that is resource data and that is an instance of "birthdate"
where "birthdate" is a subclass of "date".
Direct: +44 (0)20 7934 4960
Home: +44 (0)16 9774 1504
Fax: +44 (0)20 7934 3377
From: Lars Marius Garshol [mailto:email@example.com]=20
Sent: 22 July 2003 17:01
Subject: Re: [tmql-wg] Proposed requirements: Operations on primitive
* Chris Angus
| I guess that the reason that I brought it up was that if anything is
| to be done around typed resources it would be difficult to ignore
| the existence of the class-instance mechanism. The problem, as I
| see it, would be making the connection between a TM class and a
| specific primitive data type - it would not seem that appropriate
| for a query language to be making the necessary assertion and there
| are currently no PSI's for them.
Oh, I see what you mean. Yes, you are right, and there are two issues
here, I think.
The first is that, as you say, it is not appropriate for the query
language to suddenly start asserting that "what we have here is a
number" if that information is not already available elsewhere. I've
implicitly been assuming that the typing information would originate
with a TMCL schema for the information, but in thinking about it now I
see that if we include implicit (or even explicit) type conversions in
TMQL that will allow the QL to suddenly start typing what was not
We need to think about that a little.
The second issue is that there is, at least in the minds of many
people coming to this without prior exposure, a connection between the
type-instance PSI and the primitive typing. We should also think
through what our view of this is.
I think I would play it out as follows: if we assert that all
occurrences of type "birthdate" are dates what we are really saying is
that the "birthdate" connects a topic to a value that is of the
primitive type "date". I think this works, but some thinking about the
connection between topic types and primitive value types still seems
to be missing. They might actually be the same, and if so we should
just assume that from the beginning to avoid screwing up majorly in
the way that Python and Java did (classes wholly separate from
primitive types) and which Eiffel mercifully did not.
Lars Marius Garshol, Ontopian <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50 <URL: http://www.garshol.priv.no >
tmql-wg mailing list