LLFourn / secp256kfun

A pure-rust secp256k1 library optimised for fun
BSD Zero Clause License
104 stars 29 forks source link

Acronym is in all caps #31

Closed tcharding closed 4 years ago

tcharding commented 4 years ago

The acronym ECDSA is in all caps in this repository. This is counter to Rust coding conventions so for users of the library it seems unusual. Is there a reason for this break in convention?

In UpperCamelCase, acronyms and contractions of compound words count as one word: use Uuid rather than UUID, Usize rather than USize or Stdin rather than StdIn. In snake_case, acronyms and contractions are lower-cased: is_xid_start.

ref: https://rust-lang.github.io/api-guidelines/naming.html

LLFourn commented 4 years ago

No there is no reason in particular. Though if we're going to be strict about this I guess it's time to enable clippy and find something that picks up these kinds of things.

In general while doing crypto implementations I violate the shit out of variable naming conventions e.g. let X = g!(x * G). which is just necessary for clarity. I don't mind sticking to it for type names.

Let's do clippy and see if we can address that then: https://github.com/LLFourn/secp256kfun/issues/32

tcharding commented 4 years ago

In general while doing crypto implementations I violate the shit out of variable naming conventions e.g. let X = g!(x * G). which is just necessary for clarity.

Yeah it almost broke my eyes when I started reading crypto code with things like X_a but I see now why its necessary and ones eyes get used to it.

Cheers