[xquery-talk] XQuery needs to prohibit variable redefinition

Michael Kay mhk at mhk.me.uk
Thu Jul 15 21:47:23 PDT 2004


> That's the dumbest rationale for a language feature yet!  The language
> is also well-defined if variable redefinition are *not* allowed.
> 
> If we have a feature without a use-case, where removing it may reduce
> a *very* common case of beginner confusion (as we've seen too many
> times on this list), and a significant source of hard-to-find 
> (beginner
> and non-beginner) bugs, then it seems like a non-brainer to me.
> 
> (I'm guessing from your reply that you don't disagree.)


I may be misrepresenting people but I suspect the underlying motivation is
that the formal semantics, in translating queries to the core language,
often generates multiple variables with the same name, and changing the rule
would have caused some inconvenience in that area.

Michael Kay



More information about the talk mailing list