[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Local namespace

Martin Probst mail at martin-probst.com
Fri Sep 11 17:23:17 PDT 2009


  Local namespace
> XQuery 1.1 is introducing the "private" function modifier, which will
> allow the definition of functions that aren't exported from a module.

Simply dropping the namespace requirement and mandating that only the
properly namespaced functions are exported might have accomplished the
same thing without additional syntax, right?

>> I have also never really understood why it must be possible to have
>> one module with one target namespace split over multiple files; I
>> think Java has shown that the forced one-to-one relationship between
>> conceptual name (class) and file (.java) is a good thing.
>
> 1) Modules aren't classes, they are more like library APIs.

Yes.

> 2) Java's rules are by no means universally considered a good thing. In
> particular it might be beneficial to split up a 5000 line Java class
> into multiple files, or to group together implementations of the same
> method from multiple implementations of a class.

Well, if you have a single class spanning 5000 lines that might be a
sign of doing it wrong in the first place ;-) The thing about grouping
together tiny, closely related classes works for me in Java using
nested classes, YMMV.

My point was that I generally think its beneficial to have only
exactly one "entity" (i.e. XQuery module file) completely containing
everything thats relevant for one particular namespace, that makes
many things much easier, in particular when IDE support (go to
definition) isn't all that great yet.

> 3) Actually the XQuery spec doesn't say anything about whether a module
> namespace can be split across multiple module files - that's left
> implementation defined.

Yes, but this is how I understood the feature. And at least at some
point of time the test suite kind of enforced that feature.

Martin


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.