[Developers] type checking?
John Giannandrea
jg at metaweb.com
Sun Dec 2 20:56:04 UTC 2007
Arthur van Hoff wrote:
> Just for kicks I added the postal code 94025 as founder of the NPR
> radio
> station. I don't understand why a postal code is allowed to also be a
> company founder and a person. Maybe you need to explain more clearly
> why
> this is a good thing...
Ill let the client designers respond to the suggestions that its too
easy to type things from autocomplete. Its certainly too hard to
clean up, I agree. When you remove the type, the item no longer shows
up, but its still there in MQL.
Im not claiming that its a 'good thing' that you made a postal code
into a radio station founder, just that loose typing is a prerequisite
for a system like this, where not everything is known up front. For
example if you knew that 'Terry Gross' was a radio show host but we
only had her as a person, then adding her in to the right field would
co-type her and give her the correct reverse property. Could there be
a confirmation step there, sure, but we dont want to not show you her
as an option if you typed in her name.
We do have the beginnings of more structure in the type system,
enumerations and included types and one could imagine using these to
start to limit what gets done easily vs what requires confirmation.
So a radio host must already be a person might be a constraint we
could use in the UI.
Ultimately we can imagine having even more metadata like type
exclusion information, that a zipcode is never a person. But that
leads directly into the haunted wood called formal ontology. If you
imagine a continuum between semi-structured user entered text
(wikipedia infoboxes say) and Cyc, I imagine that we will be most
successful if we end up somewhere in the middle. So our type system
is *not* normative, and is loose specifically so we can capture
information that was unexpected and then, as a community, derive long-
lasting types from the data users created.
> UI. This will break my application, which expects the property to only
> refer to objects of the correct type.
MQL explicitly does not enforce strict typing. If your application
has code that requires that its dealing with a radio station founder,
you should add that as a type constraint in the place you extract
those properties. In theory we could add a stricter query mode to
MQL, but haven't yet.
-jg
More information about the Developers
mailing list