Re: Shadowing of variables..

FWIW,
I agree with Florent, and would vote against it.  Especially when
considering newer programmers, or programmers who come from an imperative
programming background, immutable variables (variables that don't vary) can
be confusing.  Allowing them to redefine (shadow) an immutable variable
just makes it all the more so.  I think enforcing each variable to have a
unique name within the same scope would be in keeping with the nature of
this programming paradyme, and would help to reduce bugs, and make bugs
that do occur easier to find.
Just my two cents.
Cheers!


On Mon, Nov 28, 2011 at 5:58 AM, Geert Josten <geert.josten@dayon.nl> wrote:

> > > PS: what are the use cases for XSLT? ;-)
> >
> >   Honestly, I am not quite sure but I suspect this is the same
> > reason.  Maybe also to ease generating code in some cases.  But
> > I didn't say I liked it more in XSLT :-)
>
> Not how I meant it. It is just if this is common practice in XSLT people
> could be used to this, and expect it to behave similarly in XProc. XQuery
> allows doing similar things with let's as well, so why should XProc be
> different? ;-)
>
> Cheers..
>
>

Received on Monday, 28 November 2011 13:30:10 UTC