Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I prefer self. The changes in ES5 in JavaScript were painful because some people kept losing track of `this`'s scope. IIRC it changed with arrow functions, making it hard to know what `this` the code was using.

I prefer an explicit `this` or `self` being passed, so that I know where it's defined. Something close enough, Kotlin uses `it` in lambdas. If you're nesting your lambdas, it can be tricky to review the code when just staring at it (when the IDE isn't helping you with types).



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

Search: