How to return 2+ values with 0 allocation in Kotlin
The problem
Most programming languages, including Kotlin, only allow returning one value, and there's a reason for that: We don't want to depend solely on the order of the parameters, because it can easily break through refactoring, or even before th...
blog.louiscad.com5 min read
Roman Dawydkin
You are "saving" allocations, but bloating bytecode with inline functions. Is it worth it? And if you remove the inline modifier, there will be allocations for lambdas. Just let the GC do the work.