Hacker News new | past | comments | ask | show | jobs | submit login

I agree with you, it's definitely a trade-off between developer ease and perf.

I get around that in js mostly by avoiding classes and `this` entirely unless I'm sure I'm going to have a large number of instances of something. But there is the mental overhead of "Do I need to wrap this function in an arrow function before passing it around to avoid getting an unexpected `this`?"

So yeah, not saying I have a great solution -- just that none of the existing solutions really seem ideal.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: