4 ms·
Yup. I love this style of using code to create a "paragraph" of code with a section heading. You don't always want to separate out a function, but you do want t
by aspaceman 5y ago
Yup. I love this style of using code to create a "paragraph" of code with a section heading. You don't always want to separate out a function, but you do want the advantage of "titling" a section of code.
- mr_mitm 5y ago> You don't always want to separate out a function, Why not? The above could have easily contained a `ensureDirectoryExists(item)`. It would have the benefit of being more reusable, too.
- sa46 5y agoAn earlier submission has a lively debate between these two approaches. https://news.ycombinator.com/item?id=12120752 https://news.ycombinator.com/item?id=12120752