Click here to Skip to main content
14,660,320 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
Greg Utas20-Sep-20 6:30
professionalGreg Utas20-Sep-20 6:30 
GeneralRe: while(true) is not fun Pin
honey the codewitch20-Sep-20 6:35
mvahoney the codewitch20-Sep-20 6:35 
GeneralRe: while(true) is not fun PinPopular
F-ES Sitecore20-Sep-20 7:09
mveF-ES Sitecore20-Sep-20 7:09 
GeneralRe: while(true) is not fun Pin
Nelek20-Sep-20 7:41
protectorNelek20-Sep-20 7:41 
GeneralRe: while(true) is not fun Pin
David O'Neil20-Sep-20 7:28
professionalDavid O'Neil20-Sep-20 7:28 
GeneralRe: while(true) is not fun Pin
Nelek20-Sep-20 7:43
protectorNelek20-Sep-20 7:43 
GeneralRe: while(true) is not fun Pin
BillWoodruff20-Sep-20 10:20
mveBillWoodruff20-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 
state machines are a good argument for gotos. It is impossible as far as I know, to implement every scenario possible for a deterministic finite automata based state machine without using either array based tables, or goto statements. while/for/etc don't cut it because the flow can become too complicated for those constructs. There was a Knuth paper you linked to earlier** that presented a defense of goto that is similar to my defense of it just above.

** here's the code from that paper (Example 1):
for i := 1 step 1 until m do.
if A[i] = x then go to found fi;
not found: i := re+l; m := i;
A[i] := x; B[i] := 0;
found: B[i] := B[i]+I; 

rewritten without goto it's even worse (Example 1a):
i:=1;
while i < m and A[i] # x do i :-- i+1;
if i > m then ra := i; A[i] := x; B[i] ::= 0 fi;
B[i] := B[i]+I; 

Real programmers use butterflies

GeneralRe: while(true) is not fun Pin
BillWoodruff20-Sep-20 11:41
mveBillWoodruff20-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
Membertrø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
Membertrø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 
GeneralRe: while(true) is not fun Pin
Grant Rostig21-Sep-20 19:04
MemberGrant Rostig21-Sep-20 19:04 
GeneralRe: while(true) is not fun Pin
trønderen22-Sep-20 0:24
Membertrø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
MemberFrank Malcolm24-Sep-20 12:40 
GeneralRe: while(true) is not fun Pin
BillWoodruff20-Sep-20 10:46
mveBillWoodruff20-Sep-20 10:46 
GeneralRe: while(true) is not fun Pin
Member 448047420-Sep-20 19:36
MemberMember 448047420-Sep-20 19:36 
GeneralRe: while(true) is not fun Pin
Member 1486610420-Sep-20 19:47
MemberMember 1486610420-Sep-20 19:47 
GeneralRe: while(true) is not fun Pin
Wizard of Sleeves20-Sep-20 20:23
MemberWizard 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
MemberMartijn Smitshoek20-Sep-20 20:48 

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.