[tmql-wg] Proposed requirements: Operations on primitive types

Lars Marius Garshol larsga@garshol.priv.no
22 Jul 2003 18:01:05 +0200


* 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
typed before.

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 >