re: What are the latest trends in front-end JavaScript? VIEW POST

FULL DISCUSSION
 

I think the camp is divided on this still, but regardless, the adoption of static typing in JavaScript is increasing.

My experience has been with TypeScript, so in this space there are several large projects in OSS land that have been or started using TypeScript. The thread in this tweet names some big ones.

On the Flow side, I have less knowledge of projects using it as I don't really work in that space, but I'm aware that FireFox DevTools and spectrum have embraced types with Flow. If you know of other large OSS projects using Flow, please comment.

Also related...

 

Coming from a Java/C background in university this really really intrigues me. It was one of my big hangups context switching, learning web while studying Java. I am interested to see where this goes. There was an article I read by Eric Elliott called The Shocking Secret About Static Types where he basically says that static typing in JavaScript is not necessary and doesn't necessarily reduce bugs.

It is an interesting, albeit controversial, take.

 

It's definitely not necessary as many have built large scale applications in Javascript before Flow and TypeScript, but in my experience, if you want to scale your team quickly on a project, avoid silly mistakes like typos and be able to refactor quicker, you need something like TypeScript. Couple that with editors that have plugins or native support for TypeScript, and you all of a sudden have a way better developer experience.

I agree partially with him about it not preventing bugs. TypeScript eliminates certain kinds of bugs: runtime errors due to typos, potentially issues related to type coercion and stuff like assigning a completely different type to a variable because these are caught at transpilation (compile) time. Basically a lot of the same issues that would fail at compile time in strongly type languages like C# or Java.

code of conduct - report abuse