Click here to Skip to main content
15,886,067 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: while(true) is not fun Pin
BillWoodruff20-Sep-20 10:20
professionalBillWoodruff20-Sep-20 10:20 
GeneralRe: while(true) is not fun Pin
honey the codewitch20-Sep-20 11:09
mvahoney the codewitch20-Sep-20 11:09 
GeneralRe: while(true) is not fun Pin
BillWoodruff20-Sep-20 11:41
professionalBillWoodruff20-Sep-20 11:41 
GeneralRe: while(true) is not fun Pin
honey the codewitch20-Sep-20 11:45
mvahoney the codewitch20-Sep-20 11:45 
GeneralRe: while(true) is not fun Pin
trønderen21-Sep-20 2:42
trønderen21-Sep-20 2:42 
GeneralRe: while(true) is not fun Pin
honey the codewitch21-Sep-20 3:00
mvahoney the codewitch21-Sep-20 3:00 
GeneralRe: while(true) is not fun Pin
trønderen21-Sep-20 3:17
trønderen21-Sep-20 3:17 
GeneralRe: while(true) is not fun Pin
honey the codewitch21-Sep-20 3:39
mvahoney the codewitch21-Sep-20 3:39 
True, it's not. I was simply pointing out that he *did* produce an alternative. As for me I'd prefer a state machine example.

Compiled state machines requires gotos (i'm excluding array driven ones here). It's true that some state machines can be implemented without them, but not all of them can.

The reason is you need to goto into and out of loops all of the time, just because of how they work. Furthermore state machines more clearly translate to drawn graphs which then directly map to the code, making the code easy to follow if it uses gotos, but not if it uses the array driven style. In this article[^] there's some coverage of what that looks like.
Real programmers use butterflies

GeneralRe: while(true) is not fun Pin
Grant Rostig21-Sep-20 19:04
Grant Rostig21-Sep-20 19:04 
GeneralRe: while(true) is not fun Pin
trønderen22-Sep-20 0:24
trønderen22-Sep-20 0:24 
GeneralRe: while(true) is not fun Pin
honey the codewitch22-Sep-20 4:34
mvahoney the codewitch22-Sep-20 4:34 
GeneralRe: while(true) is not fun Pin
Nelek20-Sep-20 20:31
protectorNelek20-Sep-20 20:31 
GeneralRe: while(true) is not fun Pin
Frank Malcolm24-Sep-20 12:40
Frank Malcolm24-Sep-20 12:40 
GeneralRe: while(true) is not fun Pin
BillWoodruff20-Sep-20 10:46
professionalBillWoodruff20-Sep-20 10:46 
GeneralRe: while(true) is not fun Pin
Member 448047420-Sep-20 19:36
Member 448047420-Sep-20 19:36 
GeneralRe: while(true) is not fun Pin
Member 1486610420-Sep-20 19:47
Member 1486610420-Sep-20 19:47 
GeneralRe: while(true) is not fun Pin
Wizard of Sleeves20-Sep-20 20:23
Wizard of Sleeves20-Sep-20 20:23 
GeneralRe: while(true) is not fun Pin
Rage20-Sep-20 21:01
professionalRage20-Sep-20 21:01 
GeneralGoto considered useful Pin
Martijn Smitshoek20-Sep-20 20:48
Martijn Smitshoek20-Sep-20 20:48 
GeneralRe: while(true) is not fun Pin
Rene Balvert20-Sep-20 20:48
Rene Balvert20-Sep-20 20:48 
GeneralRe: while(true) is not fun Pin
trønderen21-Sep-20 2:47
trønderen21-Sep-20 2:47 
GeneralRe: while(true) is not fun Pin
Bob Beechey20-Sep-20 20:49
Bob Beechey20-Sep-20 20:49 
GeneralRe: while(true) is not fun Pin
c6jones72020-Sep-20 22:21
c6jones72020-Sep-20 22:21 
GeneralRe: while(true) is not fun Pin
#realJSOP20-Sep-20 23:52
mve#realJSOP20-Sep-20 23:52 
GeneralRe: while(true) is not fun Pin
glennPattonWork320-Sep-20 23:55
professionalglennPattonWork320-Sep-20 23:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.