[tmql-wg] aliases

Lars Marius Garshol larsga@ontopia.net
Thu, 26 Feb 2004 11:15:10 +0100


* Rani Pinchuk
| 
| 1. Variants can be placed one inside the other. 

Nope. They can in the XTM syntax, but that's flattened in the data
model, so this isn't an issue. (Look at the variant item and you'll
see.)

| I am not sure if 
| 
| select $TOPIC from
|     { value($TN, "cpu") |
|       value($VN, "cpu"), variant-name($TN, $VN) },
|     topic-name($TOPIC, $TN)?
| 
| covers that, but I might be wrong (?).

It doesn't cover it, but that's because it doesn't need to. :-)
 
| 2. It seems to me that in many applications it is necessary to find
| a topic only by its name (for example question/answering systems),
| and if so, the alias command can become quite popular.  

Oh, certainly. The trouble is that there is a *lot* of this stuff that
probably will be wanted often. We can put some shortcuts into the
language, but it's very important not to add too many. So erring on
the side of caution to begin with is, I think, crucial.

| On the other hand, macros/functions/inference rules usually suffer
| in performance compared to a built in feature [...]

That is true.
 
| I am not against having a mechanism to extend the language like
| inference rules, but I think that because of performance issues, the
| popular functions should be built in. Isn't alias popular enough?

I don't think so, but experience could prove me wrong. Note that what
we could do is do the first version without it, then add it in a later
version. We could also define it as a function/inference rule in the
standard, and then let implementations decide how they want to
implement it.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >