|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: The Perils of Sudden Type-Safety in XPath 2.0
Dimitre, David, Kurt,
Dimitre Novatchev wrote: > "Gunther Schadow" <gunther@xxxxxxxxxxxxxxxxxxxxxx> wrote in message >>Michael suggested I comment on the official w3c comment list. But >>it could be a more powerful comment if it came from more than one >>of us. We could draft a comment and then mass-mail it in from >>differnent members of this list. > Not too long ago David Carlisle expressed strong concerns on > similar issues. > > And please add to the list of issues the "feature" of different > variables having the same name in the same lexical scope... > > I have the feeling that a group of people has the goal of making > XSLT a ridiculous language.
I am also copying Michael for the fairness. Michael has spoken in favor of some type safety and I trust him a lot, certainly he is not someone who could be accused of trying to throw sand into the gears of XSLT. I could see how parameter polymorphism would work nicely even with automatic type casting. First one would attempt at matching an function's implementation against the actual argument types and only if no complete match exists, conversion would be done on those actual arguments that do not macth the type of the corresponding formal argument. The whole thing could be disambiguated by a match score that would be n
score:=SUM(likeness(type(formalArg[i]), type(actualArg[i])) * (n - i))
i=1with n being the number of arguments, and the "likeness" function between types being something that makes double and int more related than double and boolean. Also I have factored in the position of the argument just for the fun of it. This may be a totally off base solution to the polymorphism issue. If so, forget it and suggest a better one.
regards, -Gunther
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








