4 ms·
Thanks for your comment. I see your point with the missing implementation of "downloadAsync()". About the "entrance fee": Do you really feel that the shorter v
by tbartel 10y ago
Thanks for your comment. I see your point with the missing implementation of "downloadAsync()".
About the "entrance fee": Do you really feel that the shorter version is more difficult for less-experienced devs to understand? The verbose version is unlikely to be easily understandable, in my opinion.
In general, I don't think that more lines of code make something more readable.
- ebcode 10y agoThe "entrance fee" in this case would be: understanding promises. When you introduce a new feature into a language, my assumption is that a "less-experienced dev", by definition, would not have experience using promises in production. So if you're going to sprinkle in higher-level (or just new) concepts into your code, you're assuming a certain level of experience for the devs who will come after you. If, instead, you sort of "spell everything out", it will take more words to do that, but you aren't referencing an assumed set of shared knowledge. If anything, I think it would help to identify what assumptions are inherent in our code, and at least point to references for a "less-experienced dev" in the comments. A comment that said: "Hey you! This code uses promises, so if you don't know about those, check out this ref: [URL]", would be extremely helpful in this case.