4 ms·
do_stuff1() is a shorthand. It can be a block of code tens of lines long.
by rumcajz 11y ago
do_stuff1() is a shorthand. It can be a block of code tens of lines long.
- jonsen 11y agoIt is a part of the structured programming idea to make modules callable by a "shorthand". It is not in the spirit of structured programming to make use of flow control flag variables.
- rumcajz 11y agoBut if you extract each piece of code that doesn't fit the structured syntax into a separate function you'll end up with zillions of small functions witch have no clear semantics by themselves (only when considered within the context of the calling function). That's probably the most unreadable coding style I've seen in my career.
- jonsen 11y agoI did not say it was recommendable. I just said that that was the structured counterpart. Your counterpart is not. Also I believe most structured programming advocates have no problem considering leaving a loop in the middle as a valid programming structure.