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

Robert Barta rho@bigpond.net.au
Wed, 23 Jul 2003 06:09:40 +1000


On Tue, Jul 22, 2003 at 05:38:05PM +0100, Chris Angus wrote:
> 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".

Chris,

Or, the birthdate could be completely inlined into a URN:

#---------------
(has-birthday)
person   : rho
birthday : urn:x-my-birthday-is-paradox:1.1.11
#---------------

\rho

> -----Original Message-----
> From: Lars Marius Garshol [mailto:larsga@garshol.priv.no] 
> Sent: 22 July 2003 17:01
> To: tmql-wg@isotopicmaps.org
> Subject: Re: [tmql-wg] Proposed requirements: Operations on primitive
> types
> 
> 
> * 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 >
> 
> _______________________________________________
> tmql-wg mailing list
> tmql-wg@isotopicmaps.org
> http://www.isotopicmaps.org/mailman/listinfo/tmql-wg
> _______________________________________________
> tmql-wg mailing list
> tmql-wg@isotopicmaps.org
> http://www.isotopicmaps.org/mailman/listinfo/tmql-wg
>