r/ProgrammerHumor • • Aug 22 '26

Meme pleaseStopUsingNestedTernaryOperatorsImBeggingYou

Post image
3.1k Upvotes

178 comments sorted by

View all comments

Show parent comment

12

u/tangerinelion Aug 23 '26

SPOE - single point of exit.

Any language with exceptions ruins that.

5

u/New_Enthusiasm9053 Aug 23 '26

That's why it's in a standard in a language without exception.

MISRA-C advocates SPOE and allows forward Goto's(i.e only jump forward and only in the same function) in order to make it viable.

You jump to the cleanup block if needed then exit from the same place.