DEV Community

Discussion on: What’s an unpopular software opinion you have?

Collapse
 
ecognito profile image
E Cognito

I’ll admit I’ve always passionately disliked Javascript. I also have a strong preference for statically typed languages over dynamic, but always thought Javascript was the most unlikeable of the lot. Perhaps it is that I initially learnt it by osmosis, trying to get things working under both Netscape and early Internet Explorer browsers at the same time. Worrying if I put my curly brace on the same line or the following line, or if I forgot a semi-colon at some obscure, critical location. That said, ES6 has improved things a lot.

But I’ve always been hesitant of dynamic languages in general, preferring statically typed for any codebase of significant size. The 2000's had been a bit discouraging for me in this regard. First everybody was loving Ruby, then seemed that Python has overtook it in attention. And then Node.js came along and I really felt like Bromden with a pillow, looking for a way to smother the insanity.

(As an aside, I do quite like Ruby as a language, and writing Coffeescript - the wonderful lipstick for the pig that is javascript - has given me an appreciation for the indentation feature a’la Python.)

The number one problem to my mind with using dynamic languages for a large codebase is maintainability. Refactoring a compiled, statically typed language is so much easier. There is so many potential errors that the act of compiling and type checking eliminate for you that you don’t get with dynamic languages. The focus on huge amounts of unit tests always seemed like compensation for this. And refactoring code is so much easier. Add another parameter to a function, try and compile and you find all the places in the code you need to fix. Maintaining a sizeable amount of code, or code you haven’t looked at for a while is so much easier.

I think the pendulum of opinion has started to swing back in my direction in the last five years. Running stuff in a web-browser is now a serious concern, and good hackers are working on ways to portably do good programming in anything but Javascript. From Webassembly to Elm, PureScript, Typescript and others.

Newer languages like Go and Rust are taking the nice features many have lauded in the last decade as the advantages of dynamic languages. Things like good package management, less boilerplate and such, and baking them into static languages. So my outlook is getting rosier.