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

You couldn’t pay me to work with Vanilla JS on any real life project. It feels like going back to horse and buggy.

The biggest things I wouldn’t be able to live without:

- the self-documenting nature of Typescript code (I instantly know what a function accepts and returns by hovering over it).

- the comprehensive auto complete my ide gets (saves hundreds of trips to the docs / source code per day).

- the incredible productivity gains when refactoring (change one thing, instantly get notified of all 30 places in the codebase that change introduced errors and clean them up in minutes).




I haven't worked on a Ts project, but feels like i already get most of the stuff you mentioned, through ts-check in a regular js project.


> on any real life project

Could you elaborate on what the barometer/measuring stick for what makes a project real life?

I think I know what you mean. Bigger than ____ lines of code/files I'm guessing?

X number of classes/interfaces/APIs?


Sorry, “real life project” was a poor metric. I suppose I meant anything where bugs would have a negative impact on the world — either a business or individual. Realistically though, anything that I’m expected to spend more than 20 minutes working on. I’m quite the extremist when it comes to languages and highly opinionated in general.

I compulsively rewrite JS into TS and 100% of the repos I work on have “allow-js” set to false in the tsconfig. It seems to be fueled by the same “OCD” I get when designing UI, organizing css, or making music for example.


Not GP but I would never use bare JS again for anything other than maybe like a 20 line script, for the same reasons as GP


Not the parent poster, but… the size of the codebase is for sure a criterion, but also code I have to continuously maintain or add to, or code written by a team where I have to read others’ code and vice versa.




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

Search: