3 ms·
To each their own. Personally I dislike nested function calls in general and would use intermediate variables with descriptive names. var calculatedOne = an
by scottLobster 9y ago
To each their own. Personally I dislike nested function calls in general and would use intermediate variables with descriptive names.
var calculatedOne = andthisCalculatedOne(anArgumentThatMeansSomething,
anotherWordyName);
myFunctionThatDoesStuff(someArgument, calculatedOne);
Edit: That "anotherWordyName" is supposed to be column justified, HN really needs <code> tags instead of this indentation nonsense.
The extra vertical space is easily worth the increase in readability IMO.
I've never touched proportional formatted code beyond a day or two when I was forced to by my environment, and all I encountered was more annoyances in getting my code to align properly. I'm glad you found some benefit, but I'd argue those benefits could be achieved any number of other ways.
- Stratoscope 9y ago> Personally I dislike nested function calls in general and would use intermediate variables with descriptive names. Oh, I agree completely that step-by-step is often more readable than deep nesting. OTOH, your example is a good illustration of the problems with column indentation. If it hadn't been HN's goofy code formatting that messed you up, it would have been some code refactoring that changed the length of one of those variable or function names.