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
I would like to see some convergence about best practices involving underscore.
IMHO underscore should be read by humans as "I don't care", "it does not care", "it does not matter", "ignored" or "irrelevant".
... you should read as "it does not care".concatMap or "ignored".contactMap or "irrelevant".concatMap, right? Well... this is obvious that the underscore in this case is key for understanding what the code does, which means that I should care about the underscore, it cannot be ignored and it is definitely relevant.
The compiler may be plenty able to identify what the underscore is about (in microseconds!). However, humans may take several minutes to understand what this code is about.
Humans should write code primarily for other humans understand.
A best practice would be writing clean code (no magic!) targetting a human audience.
The text was updated successfully, but these errors were encountered:
I would like to see some convergence about best practices involving underscore.
IMHO underscore should be read by humans as "I don't care", "it does not care", "it does not matter", "ignored" or "irrelevant".
So, if you find a snippet of code like this:
... you should read as "it does not care"
.concatMap
or "ignored".contactMap
or "irrelevant".concatMap
, right? Well... this is obvious that the underscore in this case is key for understanding what the code does, which means that I should care about the underscore, it cannot be ignored and it is definitely relevant.The compiler may be plenty able to identify what the underscore is about (in microseconds!). However, humans may take several minutes to understand what this code is about.
Humans should write code primarily for other humans understand.
A best practice would be writing clean code (no magic!) targetting a human audience.
The text was updated successfully, but these errors were encountered: