Hi! thanks for the reply :-)
On Aug 12, 1:12 pm, "
p...@pi.net" <
p...@pi.net> wrote:
> My mental model for UnQL is that as each document is accessed, it is
> converted by JSON.parse into a javascript value, the arithmetic is
> performed and the resulting value is converted back to a string by
> JSON.stringify. This string is then stored or returned.
This is exactly what I assumed too :)
> In the above mental model, all of ===, !==, ==, !=, ^, ++ and -- have
> well specified meanings and could simply be added. However, whether
> the javascript semantics for comparison are usable in a database
> context is up for debate, with eg. both 2<{} and 2>={} returning false
> in javascript.
Funny, I see no problem with regard to comparison operators, where I
do see a problem with ++ and --.
I mean, sure, the examples you mention here look counterintuitive, but
it's well defined in any context.
++, -- have the effect of changing the value of their operand.
That means that order of evaluation suddenly starts to matters. sad :(