- From: Sandro Hawke <sandro@w3.org>
- Date: Sat, 11 Apr 2009 13:05:09 -0400
- To: kifer@cs.sunysb.edu
- cc: Changhai Ke <changhai.ke@fr.ibm.com>, public-rif-wg@w3.org
> > If so, would expect some kind of type/class constraints on these objects? > > BLD does not have any kind of type constraints (or any kind of constraints > at all). Indeed. Michael, do you have an ideas for how to add/remove the kind of constraints the PRD folks want, between dialects? One relatively painless option is a builtin which does recursive type-checking on a list. I expect they want a violation to generate an error, though, not just be false, and want it to be somehow automatic. > > Can you construct a list? Something like: > > if p(?x) and q(?y)=20 > > then=20 > > create new list x : [?x ?y] > > assert pq(x) > > In PRD? I suppose yes. To cover both PRD and BLD, I guess we'd want an n-ary "func:list" constructor builtin. In BLD you'd use it like this: if p(?x) and q(?y) then pq(list(x,y)) and I think there are corresponding ways to do it in Core and PRD. > > In terms of functions/operators (getFirst, ...) how does this look: > > http://www.w3.org/TR/xpath-functions/#sequence-functions > > In BLD these functions are not needed, but they might be needed in PRD. They're not needed because they're easy to write, but there's no harm in providing them, is there? (getFirst is trivial, of course, but reverse isn't something people want to write every time.) -- Sandro
Received on Saturday, 11 April 2009 17:05:17 UTC