Subject: Re: [xsl] Re: questions about XSLT philosophy: how much is too much? From: "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> Date: Thu, 20 Mar 2003 06:48:52 -0500 (EST) |
On Thu, 20 Mar 2003, Dimitre Novatchev wrote: > How can a newcomer judge what is the "basic design" and what is "natural" > for a language? > > The fact that you may be experiencing difficulties in understanding these > does not mean that the language is used unnaturally. > > Or shall we start a witch hunt because we do not understand how someone is > using the language and proclaim this use as "unnatural"? i didn't mean for this thread to take on a life of its own like this, and i think you're overreacting to what i wrote. i never claimed that certain usage of XSLT was "unnatural". what i *said* was that, for someone not used to it and coming in with the understanding that XSLT was being promoted as a *functional* language, seeing it being used in what appears to be a non-functional (i.e., procedural) way would *seem* not natural. that's all, nothing more. once upon a time, i programmed in prolog, and even taught the language in a college course in AI. a lot of students had difficulty getting their head around their first functional programming language until they finally clicked on how functional programming worked -- then things went smoothly. my only point from previous posts was that there is potential confusion for newcomers like me when we're told up front that XSLT is functional, then almost immediately see it being used to solve problems in what appears to be decidedly non-functional ways. one example of potential confusion is in tidwell's book, p. 3, where he *first* writes, "XSLT is heavily influenced by the design of functional programming languages ... functional programming languages define programs as a series of functions ..." and yet, in the very next paragraph, he writes, "Instead of looping, XSLT uses iteration and recursion." excuse me but, where i grew up, iteration is just another word for looping. and looping sure seems to have a procedural programming history. and the potential for confusion for beginners increases when they learn that XSLT does indeed have "if" statements, case statements and loops. suddenly, this emphasis on functional programming seems not so strong anymore. finally, not to beat this to death, since i read that it's coming in XSLT 2.0, but i was amused to see how one finds, say, the largest value among sibling nodes, which as i recall, involved comparing to all nodes along the preceding-sibling:: and following-sibling:: axis, yes? when i saw that, my first reaction was, why is there no max() function? i mean, given that XSLT was promoted as being functional, it struck me as ironic that the one thing that would have made this solution easy -- a max() function -- wasn't there. anyway, i didn't mean for this observation to become such an issue. maybe i'll just head down to the local bookstore and see if i can haggle over the prices of their remaining WROX books. ciao. rday XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: questions about XSLT phil, Dimitre Novatchev | Thread | [xsl] Re: Re: questions about XSLT , Dimitre Novatchev |
RE: [xsl] seriously trivial questio, David . Pawson | Date | RE: [xsl] WROX going under, Robert P. J. Day |
Month |