Van: Rob Stapper [mailto:[email protected]]
Verzonden: zondag 19 juli 2015 15:10
Aan: 'Adam Retter'
Onderwerp: RE: [xquery-talk] set as datatype in xquery



Sure I can do that because after all an array is a glorified dataset. But I 
won’t J.

Question is: does the W3C as a standardization-organization, want its product 
to settle for a workaround like that?



Van: [email protected] [mailto:[email protected]] Namens Adam 
Retter
Verzonden: zondag 19 juli 2015 13:54
Aan: Rob Stapper
CC: [email protected]
Onderwerp: Re: [xquery-talk] set as datatype in xquery



Okay I see what you are getting at but in light of the fact that there is not a 
set type, but there is an array type, could you not just use the array type 
with the XPath 3.1 function arrays:for-each?

Regards polluting your code, you would only have that if you chose to access 
the array by index, instead you could just stick to for-each.



Well, I see an array as a specialized dataSet.

I see an array is an indexed, c.q. subscripted, dataset.

Or I see a dataset is an array without the indexing-mechanism.

Or you could also see a dataset as an map without the mapping-mechanism.

What remains is a dynamic set with data-items where the items can individually 
be processed, e.g. by a for-each function, but not individually be addressed.



Using arrays as datasets pollutes my code with its addressing mechanism.

Especially for a function language expressiveness of the language should be one 
of the highest goods.



Rob



Van: Adam Retter [mailto:[email protected]]
Verzonden: zondag 19 juli 2015 12:02
Aan: Rob Stapper
CC: [email protected]
Onderwerp: Re: [xquery-talk] set as datatype in xquery



Can you tell me how you see a dataSet being different to an array?



On 19 July 2015 at 10:27, Rob Stapper <[email protected]> wrote:

Hello,



Is it an option to add a “dataSet” as datatype in xquery, like for example the 
“array”?

My case is that I’m having this high-order function that iterates through a 
sequence and start a given function on each item until it receives back an 
‘nothing’, than it breaks off.

This works great except with sequences which I ( have to) use for “dataSets”: 
there are occasions that I need to return an empty set without breaking of the 
iteration.

In xquery there are empty arrays, empty maps and empty elements but no empty 
“dataset”, like - set {} -



Thanx,



Rob Stapper



PS.

- definition for “dataset” could be something like: - a datatype representing a 
dynamic collection of data-items –.



- Since the “dataSet” is an datatype, “dataSets” could hold other dataSets.

- Function “for-each” (  no particular sequence) could take a “dataset” but 
“fold-left” and “fold-right” ( particular sequence) could not.

- I don’t know if a “fold”-function ( no particular sequence) would make sense, 
haven’t thought about it enough.





  _____


 <https://www.avast.com/antivirus> Afbeelding verwijderd door afzender. Avast 
logo

Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
www.avast.com <https://www.avast.com/antivirus>




_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk




--

Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk



  _____


 <https://www.avast.com/antivirus> Afbeelding verwijderd door afzender. Avast 
logo

Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
www.avast.com <https://www.avast.com/antivirus>






--

Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk



---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to