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

RE: XQuery - Grammar? Implementations?

Michael Kay mike at saxonica.com
Mon Feb 2 09:29:34 PST 2009


  RE: XQuery - Grammar? Implementations?
> I am not sure your criticism is justified in its harshness. 
> At least if it is the case, as I believe, that implicit 
> conversions may indeed interfere with optimization.

Well, for starters, I think that usability is a much more important goal in
language design than optimizability. 

And I don't think they are in contradiction. Usability demands consistency
and orthogonality, and these are the very features of a language which help
to make it optimizable.

> 
> Declarations, on the other hand, offer a different situation, 
> because they are not "called": only one explicit conversion 
> per declaration may become necessary, and the expression to 
> be converted is a top level expression, which can be 
> comfortably wrapped in the appropriate conversion call. 

It can be done just as comfortably by the compiler as by the user. I don't
see why making the user do atomization "by hand", rather than having the
compiler do it on the user's behalf, makes for a better language; and I
don't see why variable declarations should be treated differently from any
other context where there is a supplied expression and a required type.

It's interesting to note that Java allows *more* implicit conversions in a
variable declaration than in a function call.

Michael Kay
http://www.saxonica.com/



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-2007 All Rights Reserved.