qt4cg / qtspecs

QT4 specifications
https://qt4cg.org/
Other
28 stars 15 forks source link

fn:all, fn:some #103

Closed benibela closed 2 years ago

benibela commented 2 years ago

a) the text says the function returns boolean, but the signature says integer*

b) the text considers a case where the second argument is omitted, but there is no one argument function signature

c) fn:some is a wrapper around XQuery's some expression, and fn:all is a wrapper around XQuery's every expression. Is this not confusing and people would expect it to be a wrapper around some kind of all expression? Or be called fn:every?

d) I think it is pointless to have such functions when there are already the some/every XQuery expressions

dnovatchev commented 2 years ago

d) I think it is pointless to have such functions when there are already the some/every XQuery expressions

The world is not only XQuery. For people who maintain a functional programming approach to coding these two functions are really convenient and would significantly decrease their development time and proneness to errors.

Otherwise one could think that just having the 1 and 0 bits and the and gate is really sufficient to perform all classical (non-quantum) computations. While this is true, strictly speaking, people are constantly making progress in designing programming languages that are more and more appropriate for software development.

rhdunn commented 2 years ago

See also https://github.com/qt4cg/qtspecs/issues/61.

michaelhkay commented 2 years ago

Duplicate of #61