4 ms·
The "Inversion of Control" section shows the solution. Using destructors is wrong on so many levels.
by classified 3y ago
The "Inversion of Control" section shows the solution. Using destructors is wrong on so many levels.
- nerdponx 3y agoAs far as I understand, Kotlin doesn't actually have first class blocks like Ruby, despite the appearance that it does. Instead, blocks are syntactic sugar for anonymous functions, so y = foo() { bar(it) } is just pretty syntax for y = foo({ it -> bar(it) })