Open kevaundray opened 1 year ago
I respect the sentiment and I think it's a reasonable suggestion. I also think moderation is key, especially when it comes to establishing new codebase rules that might be annoying to enforce in the future.
If you submit a PR, I will gladly review and merge, since the cases of such single-letter variables on the public API are so few and worth improving!
However, if we ever want to expand this "rule" to the private API as well, the patch will grow quite a bit.
Yeah I was contemplating this rule for the private API, however the change is larger and has less tangible benefits than for the public API
Motivation
Due to cryptography being closely tied to mathematics, there is sometimes a tendency to use one word variables like
z
,x
,y
for conciseness. In and of itself, its not a bad thing, however since code being written usually copies this verbatim, it makes the code harder to read and maintain.Suggestion
Remove one word variables from the public API of cryptography modules. ie anywhere a non-cryptographer needs to read the code, there should be descriptive words to describe the meaning of arguments.
Reference
Example of this is
z
andy
used here which propagates to the precompile