W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

Re: local functions and variables

From: Jonathan Robie <jonathan.robie@datadirect.com>
Date: Mon, 15 Sep 2003 12:20:12 -0400
Message-Id: <6.0.0.22.2.20030915120959.01c16718@ncmail.datadirect.com>
To: Per Bothner <per@bothner.com>, public-qt-comments@w3.org

Hi Per,

We decided not to make a change to XQuery on this point.

As you note, in the current XQuery WD, a library module may contain only 
variables and functions defined for the target namespace of the module. We 
are likely to want to have local declarations in a future version of 
XQuery, but we don't want to go there yet.

In the status quo, the 'local' prefix is allowed only in a main module, and 
implies that the function is local to the main module. No information 
hiding is associated with this prefix, but because it can only appear in a 
main module, it does not export anything.

Jonathan

At 01:02 AM 8/26/2003, Per Bothner wrote:

>The new 'local' predefined namespace prefix hints at the possibility of 
>module-location definitions, but isn't quite there.  But only a few minor 
>changes would be needed:
>
>To: "The names of all variables and functions declared in a library module 
>must be explicitly qualified by the target namespace prefix"
>(in 4.1) add "or the predefined 'local" namespace prefix."
>
>To section 4.7 Module Import add somewhere somethinga like: "Any variable 
>or functions declarations using the prefix 'local' in the module to be 
>imported are not imported.  Such definitions are only visible within the 
>library module, and never confict with definitions in other modules."
>--
>         --Per Bothner
>per@bothner.com   http://per.bothner.com/
>
Received on Tuesday, 16 September 2003 13:30:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC