3 ms·
I find the use of "yield" a little strange. In Ruby yield, yields the execution to the block that was passed in as an argument to the method being invoked. In
by navteniev 16y ago
I find the use of "yield" a little strange. In Ruby yield, yields the execution to the block that was passed in as an argument to the method being invoked. In this proposal it would replace the "return" statement inside a lambda.
- warmfuzzykitten 16y agoIn other languages, yield is used for coroutine (continuation) return. Bad choice. There is actually no reason not to use return, or to disallow break and continue. These could all have the same meaning as they do in a SAM implemented with an inner class.