You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rule is causing confusion and I don't think it's very helpful. Can it be disabled by default?
Short names are not inherently bad, particularly in short blocks.
The main point against single-character names is that variable names should ideally be descriptive. This is more relevant when used in bigger scopes. But that's a bit mute when declaration and single use are just a couple of characters apart. Then it can be more like a unique identifier without much embedded contextual information.
Hello - today, ameba complains for usage one-letter block parameter names in the stdlib sort method usage.
But even in the Crystal docs, there is example with exact that short block parameter names:
https://crystal-lang.org/api/1.11.2/Array.html#sort%28%26block%3AT%2CT-%3EU%29%3AArray%28T%29forallU-instance-method
How would you imagine more descriptive block parameter names when using the sort method? "a" and "b" are optimal.
Thanks!
The text was updated successfully, but these errors were encountered: