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

I used to be a proponent for type annotations in JavaScript. But figured out the reason was because I took C# code and translated it to JavaScript, which surprisingly works well, all you have to do is to remove the type annotations. But without the type annotations I could no longer understand what the code did. To make the code understandable in JavaScript I had to rewrite it, and name things properly. Example:

    Vector:x * Vector:s
vs

    position.x * speed.x


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

Search: