Re: Assignment no, dynamic scoping si (was: Re: [xsl] RE: Wishes for XSL revisions ...

Subject: Re: Assignment no, dynamic scoping si (was: Re: [xsl] RE: Wishes for XSL revisions ...
From: terje@xxxxxxxxxxxxxxx (Terje Norderhaug)
Date: Thu, 3 Jan 2002 16:44:28 -0800 (PST)
At 3:23 AM 1/2/02, Gunther Schadow wrote:
>
>(A) where do functional arguments play a role in XSLT at all?
>I cannot see any way to pass functions as arguments or return
>functions from functions in XSLT. If XSLT doesn't have functional
>arguments, those can't be a reason against dynamic scoping in
>XSLT.

I disagree. Before introducing a new language feature to XSLT, there should be a careful consideration to avoid that the new feature conflicts with features that we may want in the future. Being able to pass functions and templates as arguments is among features that I wouldn't like to preclude at this time.

However, as existing language implementations already demonstrates a solution to the downward funarg problem through closures, we should be beyond arguing whether it can be resolved. The combination of dynamic scoped variables and functional arguments are well understood and should be straight-forward to implement in an XSLT processor.

>And (B) why is the Common LISP CLOSURE or the earlier
>FUNARG (that keeps the binding of the function's free
>variables with the functional arguments) not a sufficient
>solution?
>
>Also keep in mind that we are not asking for dynamic scoping
>as the default, but as something one can set on particular
>variables as an option. The shallow-binding would be the
>natural way of implementing those. This is not so hard to do.

-- Terje <terje@xxxxxxxxxxxxxxx> | Media Design in*Progress 
   Software for Mac Web Professionals at <http://www.in-progress.com>
   Take Advantage of Server Side XML and XSL with Interaction 3.6!



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread