[xquery-talk] Everything is a sequence ...so ....

David Lee dlee at calldei.com
Sat Jan 25 06:23:40 PST 2014


If I were writing the language over I would never have '=' do set intersections or whatever the math term for
"some item on the left side set is also equal to some item on the right side set"

Maybe something like operators   "contains" or "has" or "oneof" or something ... but "="   ?
That took me a long long long LONG time to get used to.

of course now its way fun and I cant imagine it another way :)

This one blows me too ... 

( <foo/> eq <foo a="bar"/> )  => TRUE !!!!

Yes I know why  ... now ... but that took me about a decade to notice.




-----Original Message-----
From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of Liam R E Quin
Sent: Saturday, January 25, 2014 4:59 AM
To: ihe.onwuka at gmail.com
Cc: talk at x-query.com
Subject: Re: [xquery-talk] Everything is a sequence ...so ....

On Sat, 2014-01-25 at 09:49 +0000, Ihe Onwuka wrote:
>  you can stare an awful long time at
> 
>  someString eq ('stringA','stringB')
> 
> and not realise what is wrong.

I don't know, the message
 Single item expected, ("stringA", "strinB") found.
seems a good hint...

But I don't think of eq and = as being the same.


> I wonder whether it would have been better if eq were = and =  were 
> =>, but then I guess you'd have to worry about how to deal with the 
> other comparison operators as well.

We had to be compatible with XPath 1 at least to that extent.

After all, if we were not compatible the Web browsers would never move to XSLT 2... (hmm).


--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

_______________________________________________
talk at x-query.com
http://x-query.com/mailman/listinfo/talk



More information about the talk mailing list