qt4cg / qtspecs

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

Quantifier expressions: optional positional argument #1385

Closed ChristianGruen closed 5 days ago

ChristianGruen commented 1 month ago

This has been requested multiple times before (albeit not in this repository): What about adding a positional argument to quantifier expressions? It it simple to implement, and it would allow us to do things like…

every $item at $pos in $input satisfies $item = $pos * 2

…which would be equivalent to…

every($input, fn($item, $pos) { $item = $pos * 2 })

…and much better to read than e.g.…

not((for $item at $pos in $input return $item = $pos * 2) = false())
michaelhkay commented 1 month ago

I've never seen a need for it and there seem to be plenty of ways of doing it if needed, for example

every(for $item at $pos in $input return $item = $pos * 2)

ndw commented 5 days ago

The CG agreed to close this issue without further action at meeting 089