voddan
02/09/2017, 6:50 AMrunBlocking {}
, etc. Can't we rename that into blocking {}
?elizarov
02/09/2017, 6:52 AMblocking
was one of the original naming options. We've decided to use longer, scarier name (because it is scary -- it blocks a thread), while also making clearer what it does -- it "runs" the block of code similar to the stdlib's run
, but it also blocks your thread. Hence runBlocking
.voddan
02/09/2017, 6:54 AMrun
is very obscure and hardly adds any clarity (in my opinion, again)run
, with
is that they look like language constructs. And now we add "run's little brother" runBlocking
which does not fall into that category , hence destroying the whole illusionelizarov
02/09/2017, 6:58 AMblocking
is not a verb, while calling it block
would be confusing, too. That was another original reason in favor of defer
(which is a verb) vs async
(which is not), but async
is way more recognizable, indeed, while defer
, as it turns out, is not even known as a verb to less English-savvy people.voddan
02/09/2017, 7:00 AMelizarov
02/09/2017, 7:00 AMFuture.get()
anyone?voddan
02/09/2017, 7:02 AMforEach
(method), but would not be okey with anything but repeat
(stand alone scoping function)