|
> Home > Technology > Beer > Personal RSS XTM > The author . > On Twitter Technology blogs
Robert Barta |
Posted in Technology on 2006-05-13 00:01 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? CommentsNo comments. Add a comment |
Last comments
|