3 ms·
You often end up with a lot of extraneous variables with no useful names if you do that. A lot of the time the intermediate results in a pipeline are almost mea
by simiones 2y ago
You often end up with a lot of extraneous variables with no useful names if you do that. A lot of the time the intermediate results in a pipeline are almost meaningless.
- skybrian 2y agoThe main thing is not to do things that would be fine in other languages when they result in complications in the one you’re using. Some people want to write an entire library rather than writing statements. Why? Also, local names can sometimes be useful documentation when the function names don’t really get the point across (perhaps because they’re at a different level of abstraction). Or alternatively, in Go it’s idiomatic to keep them short.
- simiones 2y ago> Some people want to write an entire library rather than writing statements. Why? Because you want to make code more readable, and getting rid of extraneous intermediate results is one way of achieving that.