This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Re: Re: RE: Higher-Order Functions in XPath 2.0


>> >Another point: How can we produce ***more than one*** sequence in
>> >parallel?
> >> >
> >> >For example, how to produce both:
> >> >
> >> >($a(i) + $b(i))-sequence
> >> >and
> >> >($a(i) * $b(i))-sequence
> >> >
> >> >In only one pass over $a and $b ?
> >>
> >> As there are no side effects, a smart XSL processor is already
free
> >> to optimize by evaluating the two using only one pass over the two
> >> sequences, without requiring any special constructs in the
language
> >> to force parallel evaluation.
> >>

> >2. Rather than to rely on the "smartness" of a particular XPath 
> > engine, it's better to have the language guarantee that this is 
> > possible.
> 
> You haven't made the case *why* the language have to guarantee that 
> the sequences are produced in paralell rather than as multiple 
> passes. 
> This appears to be solely an efficiency issue.

Even if this was solely an efficiency issue (which it isn't), an
efficiency issue is never a minor issue.

The language will have to provide a feature, if it is needed by users.
I didn't invent this problem, other people expressed it in reply to the
question what problems they see with the XPath 2.0 WD.

Therefore it is both a functionality and efficiency issue. It is also
an issue of expressive power and elegance. Here stand also readability
and maintainability. If two operations go logically together, forcing
the programmer to split them apart and implement them independently
creates redundancy, increases the chance for errors and impacts
readability and maintainability.

The meaning of my reply was that it shows yet another benefit from
allowing sequence items to be sequences themselves.

Many people have questioned in this list what caused the decision to
disallow items of a sequence to be sequences themselves, and have
indicated that such a feature is desirable.

Cheers,
Dimitre Novatchev.


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]