Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Rename all rawOp functions to _op? #754

Open
Vectorized opened this issue Dec 14, 2023 · 1 comment
Open

♻️ Rename all rawOp functions to _op? #754

Vectorized opened this issue Dec 14, 2023 · 1 comment

Comments

@Vectorized
Copy link
Owner

Vectorized commented Dec 14, 2023

The problem with prefixing it with "unsafe" or "raw" makes stuff super verbose.

And results in inconsistencies like toWadUnsafe vs unsafeMulWad; which I understand is because unsafeToWad just sounds werid.

The _op nomenclature has been used in SIMD intrinsics like _mm256_xor, and feels more natural.

With this renaming, we can have stuff like _expWad, _lnWad, without feeling awkward.

Still, there are some advantages of "raw" prefix:

  • Auditoors immediately know it's raw.
  • Easy to codeslaw. I can track down who are using Solady's FixedPointMathLib.

I'll probably leave this up for a few weeks before deciding.

Most probably will stick to no change.

@Vectorized Vectorized changed the title ♻️ Rename all rawOp functions to _op ♻️ Rename all rawOp functions to _op? Dec 14, 2023
@z0r0z
Copy link
Collaborator

z0r0z commented Dec 30, 2023

I don't like safe and similar that want to add some semantics but not super verifiable (so, it's like "why").

++ on _op or similar more functional term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants