jameysharp opened issue #6093:
Yeah, I'm frequently confused between `inverse` and `reverse` too. I think both names are correct descriptions of what they do, but maybe later we can come up with alternate names that are less confusing. Maybe "negate" instead of "inverse", and "swap" instead of "reverse", for example._Originally posted by @jameysharp in discussion with @abrown and @meithecatte in https://github.com/bytecodealliance/wasmtime/pull/6086#discussion_r1146346401_
jameysharp edited issue #6093:
Yeah, I'm frequently confused between
inverseandreversetoo. I think both names are correct descriptions of what they do, but maybe later we can come up with alternate names that are less confusing. Maybe "negate" instead of "inverse", and "swap" instead of "reverse", for example._Originally posted by @jameysharp in discussion with @abrown and @meithecatte in https://github.com/bytecodealliance/wasmtime/pull/6086#discussion_r1146346401_
jameysharp labeled issue #6093:
Yeah, I'm frequently confused between
inverseandreversetoo. I think both names are correct descriptions of what they do, but maybe later we can come up with alternate names that are less confusing. Maybe "negate" instead of "inverse", and "swap" instead of "reverse", for example._Originally posted by @jameysharp in discussion with @abrown and @meithecatte in https://github.com/bytecodealliance/wasmtime/pull/6086#discussion_r1146346401_
jameysharp labeled issue #6093:
Yeah, I'm frequently confused between
inverseandreversetoo. I think both names are correct descriptions of what they do, but maybe later we can come up with alternate names that are less confusing. Maybe "negate" instead of "inverse", and "swap" instead of "reverse", for example._Originally posted by @jameysharp in discussion with @abrown and @meithecatte in https://github.com/bytecodealliance/wasmtime/pull/6086#discussion_r1146346401_
jameysharp labeled issue #6093:
Yeah, I'm frequently confused between
inverseandreversetoo. I think both names are correct descriptions of what they do, but maybe later we can come up with alternate names that are less confusing. Maybe "negate" instead of "inverse", and "swap" instead of "reverse", for example._Originally posted by @jameysharp in discussion with @abrown and @meithecatte in https://github.com/bytecodealliance/wasmtime/pull/6086#discussion_r1146346401_
jameysharp commented on issue #6093:
Name bikeshedding:
- negate or complement
- swapped or flipped
fitzgen commented on issue #6093:
Soft preference for
flippedoverswapped.No preference on
negatevscomplement.
gurry commented on issue #6093:
If there's an agreement on a set of names I can implement this change.
jameysharp commented on issue #6093:
Sounds good! It's not important to pick the perfect names for this so I'm not going to bother looking for agreement from everybody. We just need names that are better than what we have now. :laughing:
Let's go with Nick's preference for "flip" to replace "reverse" since nobody else spoke up, and I'll pick "negate" to replace "inverse".
I think we should pick the verb form of these words, so use "flip" because that is the thing the function does, rather than "flipped" as the thing the function returns.
cfallin commented on issue #6093:
Sorry for missing this issue, somehow I didn't see the notification and only saw this after #6862 above -- I do have some thoughts on the bikeshed color if it's not too late though!
flipandnegateare both still very confusing to me:flipcould mean that we're flipping arguments, or the sense of the condcode itself; andnegatesounds like it has something to do with twos-complement negation.I might suggest
flip_argsfor the first -- that makes it very clear that this is the condcode for the case where the args are flipped (commuted).I might suggest
complementrather thannegateas there's precedent in Boolean logic: a complement really is the opposite-bit result (true for false and vice-versa), without connotations of integer negation.Thoughts?
jameysharp commented on issue #6093:
After discussion in today's Cranelift meeting, our consensus is
swap_argsandcomplement. I'm sorry we didn't actually have consensus before you put a PR together!
gurry commented on issue #6093:
No worries @jameysharp. I'll make the change.
gurry commented on issue #6093:
Done
cfallin closed issue #6093:
Yeah, I'm frequently confused between
inverseandreversetoo. I think both names are correct descriptions of what they do, but maybe later we can come up with alternate names that are less confusing. Maybe "negate" instead of "inverse", and "swap" instead of "reverse", for example._Originally posted by @jameysharp in discussion with @abrown and @meithecatte in https://github.com/bytecodealliance/wasmtime/pull/6086#discussion_r1146346401_
Last updated: Dec 06 2025 at 06:05 UTC