var newCustomers = getNewCustomers()
foreach(var newCustomer in newCustomers) {
newCustomer.this .that etc.
}
Depending on the length of the surrounding function, you're better off using "xs" and "x". Or "cs" and "c". I think people trick themselves into thinking that long names somehow provide more context. At a high level, this is correct: modules, exported functions, etc. But for programming "in the small" it's just needless noise.It's not just the hassle of typing long names out; a good editor can help there. It's the visual overhead of having so many extra pixels lit as you read things.
Short functions are good for local functions:
var sb = new StringBuilder()
sb.AppendLine bla
...
sb.AppendLine foo // And another 5 places in the following 10 lines of code.
It's nicer to instead have:
let al = sb.AppendLine
al bla
...This is especially true then the local code pattern is 2, 3, or more lines or when it contains branches.