|
[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.comMon Feb 2 09:29:34 PST 2009
> 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! 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
|






