Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thank you for your answer. Just wanted to ask that, even though it is more clean, I think it's pretty hard to understand looking at the code. Is this style of programming usually something that used often in production? Commented Mar 8, 2021 at 22:58
  • @Heymanyoulookkindacool: That's a matter of preference and of experience. I find this much easier to read and to reason about than the code in the question. I've encouraged my teams to move toward this style, so I know that it's in production in at least one large company. ;-) Commented Mar 9, 2021 at 4:21