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

IMO it is far easier to read this:

    function add(a: i32, b: i32): i32 {
        return a + b;
    }
Than the example you provided and it is approximately the same length. I used to arrow functions everywhere in TS/JS and it made it difficult to read IME, and there was zero benefit. They are find for things like event handlers, promises chains etc. But I'd rather just use function when I don't have to worry about the value of this.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: