|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Local namespaceMartin Probst mail at martin-probst.comFri Sep 11 17:23:17 PDT 2009
> 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






