Andrew Gazelka
05/16/2019, 11:18 AMgildor
05/16/2019, 11:31 AMFudge
05/16/2019, 12:12 PMinline
, in which case no object is created.Fudge
05/16/2019, 12:13 PMAndrew Gazelka
05/16/2019, 12:13 PMFudge
05/16/2019, 12:13 PMFudge
05/16/2019, 12:13 PMlocal
inline functionAndrew Gazelka
05/16/2019, 12:13 PMFudge
05/16/2019, 12:14 PMAndrew Gazelka
05/16/2019, 12:15 PMFudge
05/16/2019, 12:15 PMnested
function you don't mean a higher order function do you? you mean a local function?Andrew Gazelka
05/16/2019, 12:15 PMFudge
05/16/2019, 12:16 PMAndrew Gazelka
05/16/2019, 12:17 PMAndrew Gazelka
05/16/2019, 12:17 PMAndrew Gazelka
05/16/2019, 12:17 PMFudge
05/16/2019, 12:18 PMAndrew Gazelka
05/16/2019, 12:18 PMAndrew Gazelka
05/16/2019, 12:18 PMtseisel
05/16/2019, 12:44 PMFunction
will be created just like with lambdas (if the function is non capturing, a single instance of the function is reused, otherwise a new one is created each time the wrapping function is called).
For JS, nested functions are natively allowed in JavaScript, so this should not introduce more overhead than the JavaScript way to define nested functions.
As for Kotlin Native, I have no idea.Fudge
05/16/2019, 12:48 PMDico
05/16/2019, 1:01 PM