More on typed data in tolog
After I posted my blog entry on typed data in tolog Geir Ove had an interesting idea: why couldn't the type conversion predicates be dynamic? Dynamic predicates are something that, as far as I know, is unique to tolog. They are not predefined, and they are not user-defined, but are instead dynamically created from the structure of the underlying topic map.
Geir Ove's idea was to do something similar based on the structure of the predicate names. This would require a special conversion module for these predicates, but that's no great loss, really. Thus, the following query:
import "http://something/or/other/conversion/" as conv conv:string-bar("12", $B)?
would convert the string "12" into a value of type "bar", whatever that might be. This is like the second alternative in the previous posting, but the difference here is that the parses the predicate name to work out which type to convert to and from.
This gets rid of the explosion of predicates as the number of types grows, and gets it back on par with the first solution in terms of implementation complexity. (It's slightly more complex to implement, but in a fun way, so who cares. :)
In short, this leaves us pretty much back where we were. The two proposed solutions are more or less equal, except that one fits somewhat more nicely into the logical approach that tolog takes. The big question then becomes what users find more natural. Well, users?
We've known for a long time that sooner or later we'd have to start supporting data types (numbers, dates, ...) in tolog, but so far we haven't done it
Read | 2006-05-10 23:17
The tolog query language has been around for a long time, but so far it only does querying, and not updates
Read | 2006-02-21 20:49