re: Another GOTO to avoid VIEW POST

TOP OF THREAD FULL DISCUSSION
re: While I am in 99% agreement, there are two things I want to point out: Decouple as much as possible. I understand the example is contrived, but y...
 

Thank you for reading and your feedback. I am aware it's a very contrived one, but I wanted it to be extremely short as I wanted to copy paste it many times over to show every step.

  1. That would be value * 2 + 1, not value + 2
# Code blocks break numeration on DEV.to
  1. That's a very different language, and without going into how recursion is memory-performant there and other niceties like pattern matching, the fact it's the only way justifies it already. Coming back to this case, I'd like to note that there's no iteration in the task at hand, yet when we first got rid of the switch case, we got a little runtime recursion.
code of conduct - report abuse