Re: three questions regarding library modules

> Local functions (and variables) are obviously useful, but we don't have 
> them in XQuery 1.0. Since every function and variable declared in a 
> module must be qualified by the module's target namespace, you can't use 
> the local prefix, which would put it in a different namespace.
> 
> You could try asking us to consider local functions and variables as a 
> new feature, but this has been considered several times and has always 
> failed so far.

I think there are two related issues here:
1. support for an automatic "local:" namespace in a module.
2. allowing multiple function/variable namespaces in a module.

As I understand it, both of these are allowed for the main
module, and neither for a library module.

If #2 is allowed, then #1 is relatively moot, since with #2,
a library module could just declare some arbitrary namespace for its
local functions (perhaps using a "local" prefix for the namespace,
or not).

In fact, I really don't see the point of #1 but having it
for the main module only: since it isn't available to other
modules, it isn't like there are extra features available
(that is, it isn't like the way anonymous namespaces
work in C++).

Anyhow, I could begrudgingly without live with the existing
limitations on library modules. I just think it an odd 
decision to give main modules more priviledges; in any 
project beyond a certain size, I end up putting practically
everything in libraries, so special features only in
the main module don't help me much.

-mda

Received on Tuesday, 17 August 2004 19:47:07 UTC