0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/src/RangeSet.zig
Cody Tapscott 7b978bf1e0 stage2: Rename Value.compare to compareAll, etc.
These functions have a very error-prone API. They are essentially
`all(cmp(op, ...))` but that's not reflected in the name.

This renames these functions to `compareAllAgainstZero...` etc.
for clarity and fixes >20 locations where the predicate was
incorrect.

In the future, the scalar `compare` should probably be split off
from the vector comparison. Rank-polymorphic programming is great,
but a proper implementation in Zig would decouple comparison and
reduction, which then needs a way to fuse ops at comptime.
2022-11-10 12:24:02 -07:00

97 lines
2.4 KiB