[xquery-talk] Everything is a sequence ...so ....
ihe.onwuka at gmail.com
Sat Jan 25 01:49:53 PST 2014
On Sat, Jan 25, 2014 at 9:01 AM, Michael Kay <mike at saxonica.com> wrote:
> The eq operator is easier to optimize because the type conversions it does are much simpler (in particular, exploiting indexes is more difficult). However, because 90% of the time people use "=", optimizers are likely to work hard at it even though it's intrinsically more difficult.
> But getting into the habit of using "eq" is something I would recommend because of the better diagnostics when you get things wrong.
I try, but you can stare an awful long time at
someString eq ('stringA','stringB')
and not realise what is wrong.
Mentally we are not attuned to distinguishing eq from =.
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.
More information about the talk