[xquery-talk] XQuery needs to prohibit variable redefinition

Daniela Florescu daniela.florescu at bea.com
Thu Jul 15 18:40:57 PDT 2004


you are of course right.  To be honest I do not remember much of the
discussion and the rationale we had at that time.

I vaguely remember people saying: " XQuery is not an imperative language
and LET is a variable definition, not a variable assignment.
It's not by prohibiting  small issues like this and avoiding this kind  
of mistake
  this that will make them understand this important fact."

Otherwise, if we do disallow it, the next comment that we'll have from  
will be: "so why can't I write :"

for $i in ...
let $i := $i +1

We will just shift the problem in a different place, but the problem of
understanding what the LET is/does still remains.

But you should try again to raise the issue in the second Last Call.
I think it will have serious chances this time.

Best regards,

On Jul 15, 2004, at 4:56 PM, Michael Kay wrote:

> For the record, here is Dimitre Novatchev's take on the issue  
> (expressed in
> XSLT terms):
> http://lists.w3.org/Archives/Public/public-qt-comments/2004Feb/ 
> 0111.html
> Michael Kay
>> -----Original Message-----
>> From: kent tegels [mailto:ktegels at Msn.com]
>> Sent: 15 July 2004 23:59
>> To: 'Per Bothner'; 'Michael Kay'
>> Cc: talk at xquery.com
>> Subject: RE: [xquery-talk] XQuery needs to prohibit variable
>> redefinition
>> I have a different view on the issue, but I don't want debate
>> that here. If
>> you're interest, its at.
>> http://sqljunkies.com/WebLog/ktegels/archive/2004/07/15/3512.aspx
>> Yet another reason I can't wait for Michael's book to get done.
>> -----Original Message-----
>> From: talk-bounces at xquery.com
>> [mailto:talk-bounces at xquery.com] On Behalf Of
>> Per Bothner
>> Sent: Thursday, July 15, 2004 5:09 PM
>> To: Michael Kay
>> Cc: talk at xquery.com
>> Subject: Re: [xquery-talk] XQuery needs to prohibit variable
>> redefinition
>> Michael Kay wrote:
>>>> There is no reason why the Core Language can't allow redefinitions,
>>>> even if the User Language doesn't.
>>>> After all, the names added by Normalization are in the 'fs'
>> namespace,
>>>> which users can't access anyway.
>>> You're preaching to the choir.
>> I suspected that.  But do you think there is any chance we can get the
>> committee to reconsider?  We do have new data: that many of
>> the beginner
>> questions we get on this list are the result of confusing
>> declarations with
>> assignments.  This is a problem.
>> Prohibiting redeclarations isn't a full solution, but at
>> least it enables
>> the compiler to reject many of these erroneous programs.
>> -- 
>> 	--Per Bothner
>> per at bothner.com   http://per.bothner.com/
>> _______________________________________________
>> talk at xquery.com
>> http://xquery.com/mailman/listinfo/talk
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk

More information about the talk mailing list