# stage2: Rename \`Value.compare\` to \`compareAll\`, etc\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/7b978bf1e05727f15fc83ae7d2455c08833cc439)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 7b978bf1e05727f15fc83ae7d2455c08833cc439

Requested commit: 7b978bf1e05727f15fc83ae7d2455c08833cc439

Commit: 7b978bf1e05727f15fc83ae7d2455c08833cc439

Tree: 61648de296eb45d762d0bc8440d144a32dea896d

Author: Cody Tapscott

Committer: Cody Tapscott

## Message

```
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.

```

## Parents

- [b1357091ae0876645d75a608bd1e26f21cec7c13](https://git.cafe/gitcafe/zig/commit/b1357091ae0876645d75a608bd1e26f21cec7c13?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/7b978bf1e05727f15fc83ae7d2455c08833cc439?format=markdown)
