3 ms·
Without go's nested functions and variable capture it's really not the same. The best use for channels in go (IMO) is to use variable scope checking to keep peo
by moltke 5y ago
Without go's nested functions and variable capture it's really not the same. The best use for channels in go (IMO) is to use variable scope checking to keep people new to the codebase from messing with resources outside of the right threads. You put all the critical code in a nested function and pass it over the channel, viola the compiler helps make sure your program is correct.