ruffsl@programming.dev to Programmer Humor@programming.devEnglish · edit-28 days agoEvery goto in the Linux kernel / Just another day on the linux-kernel mailing listyoutube.comexternal-linkmessage-square19fedilinkarrow-up180arrow-down11
arrow-up179arrow-down1external-linkEvery goto in the Linux kernel / Just another day on the linux-kernel mailing listyoutube.comruffsl@programming.dev to Programmer Humor@programming.devEnglish · edit-28 days agomessage-square19fedilink
minus-squarebss03@infosec.publinkfedilinkEnglisharrow-up4·7 days agoJava doesn’t allow goto, but specifically does have labels for labeled break/continue to support the multi-loop exiting case. I imagine these two “structures” will always be implemented in C source through disciplined use of goto.
minus-squareGladaed@feddit.orglinkfedilinkarrow-up5arrow-down1·7 days agoIt’s literally the only way to do this. Other ways include checking of loads of bools. That’s slow.
minus-squarebss03@infosec.publinkfedilinkEnglisharrow-up3·7 days agoIn C maybe. In language that support proper recursion schemes, the apomorphism models the early-exit loop.
Java doesn’t allow goto, but specifically does have labels for labeled break/continue to support the multi-loop exiting case.
I imagine these two “structures” will always be implemented in C source through disciplined use of goto.
It’s literally the only way to do this. Other ways include checking of loads of bools. That’s slow.
In C maybe. In language that support proper recursion schemes, the apomorphism models the early-exit loop.