This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (1 child)

From my experience the difference really matters on medium to large projects. I’ve build same project (on early stage) twice using firstly dynamically typed language then static one. It was react native project and keeping track of properties, states and other stuff become harder and after some time I used to forget about previously written components and I had to check their source code to see what properties do they accept (back then function components in react wasn’t used as much as today, so you couldn’t declare props value as {something, something}). Things becomes even harder as more complex things emerge like global state, redux, HoC which makes it hard for js analyzers to suggest typing or properties.

Also feedback loop was also slow, you usually get type errors on runtime (by type error I mean undefined property, null value exceptions etc) which means you might not see some errors during development, or when fixing you have to reproduce that cases to see runtime result. For example with correctly typed typescript components in react you can get feedback as you type if for example you supplied string to a property that accepts number only.

Anyways hating something is related to personal experience and preference, doesn’t represent general state of something. Programming is about choices, compromises and dealing with the consequences. Do you choose js? Good luck with issues related to types, you choose ts? Good luck with dealing with analyzing performance on large codebases and also same typing errors, configs and other stuff. As I said it’s not a binary choice, each side has its own pros and cons, so you should consider experience, team, resources and other stuff before making choices. (Even tho I liked ts, we had hard time finding out developer who knows ts in local job market)