Hacker Newsnew | past | comments | ask | show | jobs | submit | orangy's commentslogin

We are sorry for broken links, we just recently migrated from GitHub wiki pages to own site and indeed some links could've migrated incorrectly. Thanks for the heads up, we will fix it :)


Yep, I agree. Mostly because it was me digging into JMH :) Indeed we are measuring and optimising. This is still early work in progress, but we have some good results already:

    inline fun calc<T, R>(value: T, fn: (T)->R): R = fn(value)

    inline fun identity<T>(value: T): T = calc(value) { it }


    // This is optimised down to loading constant value 1 into variable x
    
val x = identity(1)
Besides having nice syntax for lots of everyday things Java developers are doing, we want to provide means for doing it effectively, clearly and maintainably.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: