-
Notifications
You must be signed in to change notification settings - Fork 291
Question: Naming of C macros #84
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I might lean a bit towards the C naming convention, as basically everything in this crate is intended to follow the same conventions as C as opposed to following Rust conventions. If we were following Rust conventions we'd probably be using the module system and avoiding weird names :) |
nominolo
added a commit
to nominolo/stdsimd
that referenced
this issue
Oct 4, 2017
alexcrichton
pushed a commit
that referenced
this issue
Oct 5, 2017
* Add _mm_sfence * Add _mm_getcsr/_mm_setcsr and convenience wrappers * Use test::black_box to simplify tests * Use uppercase naming for C-macro equivalents Discussed at #84
In #88 ended up landing the upper case names, so closing! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I think for convenience we also want to implement not just the core intrinsics but also convenience macros. For example, there are a number of convenience macros around the
_mm_getcsr
intrinsic. For the following macro:In Rust, we would define the same thing as a function:
But in Rust we normally wouldn't use all-uppercase for a function name. So, the question here is: Should we
Personally, I'm leaning towards the second option (i.e., lower-case), because most search tools are case-insensitive, so anyone who knows the name will be able to find it.
The text was updated successfully, but these errors were encountered: