3 ms·
I just started learning Go last night, but I'll hazard a guess: since Go draws heavily from C, but has the for loop as its only looping construct, it seems like
by pcthrowaway 12y ago
I just started learning Go last night, but I'll hazard a guess: since Go draws heavily from C, but has the for loop as its only looping construct, it seems likely that this habit has carried back into C code written by developers who've used Go, or who've been reading a lot C code written by developers who also use Go.
- jsprogrammer 12y agofor(;;) existed way before Go came along.
- pcthrowaway 12y agoI'm not saying it didn't, but 'while (true)' would be the more intuitive way to write that in any language besides Go.