6 ms·
Goto may cross variable initialization, so the code in goto may use a variable that does not exist, theoretically. Also a goto cleanup becomes complex if you h
by arka2147483647 5y ago
Goto may cross variable initialization, so the code in goto may use a variable that does not exist, theoretically.
Also a goto cleanup becomes complex if you have, say a dozen variables to cleanup.
Anyway, i think this is really syntaxtic sugar for the Cpp destructor. I peresume that the lambda will create an object, which will hook itself to the same mechanism that calls cpp destructors at the end of blocks.
And, as all major c compilers are also cpp compilers this seems a good idea to me. And ofcourse the lamda syntax seems same as cpp. So rhats where all this comes from.