2 ms·
The 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
by skybrian 2y ago
The 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.