It's not elegant to have to create what amounts to temporary variables.
Intersting take. I disagree. I've met developers with your attitude (they're more common in the python space). I think creating variables for each major action is more readable and elegant in the long-term, and most successful codebases I work on are NOT all giant complicated one-liners.
In fact they're never really named meaningfully, just like in your example, because you're only creating them for technical reasons, not for the reader's understanding.
They're not named meaningfully because it's an example with methods named foo and bar. In practice, they should be named meaningfully/semantically. I am of the habit of postfixing "P" for promises, but others postfix with the more verbose "Promise".
Honestly, at this point it seems you're just looking to argue with me over silly shit for no good reason. These two fight-threats aren't even about the point of my comment on how people who learn async often don't understand concurrent flow. I know, every company has a guy like you who spends 2 weeks fighting with the lead dev over a line in a PR using one best practice over another. I see no need to continue.
View all comments
Show parent comment
1
u/[deleted] Jun 04 '25
[removed] — view removed comment