3 ms·
Static/strong typing is not necessary in JS. Yes, ES6 brings the OOPiness
by h335ian 2y ago
Static/strong typing is not necessary in JS.
Yes, ES6 brings the OOPiness
- mynameisvlad 2y agoThat’s just like your opinion, man. Just because you think that doesn’t mean it’s true. The sheer fact that TS has overtaken JS for the majority of web development says enough.
- deleted 2y ago[deleted]
- bdcravens 2y ago> TS has overtaken JS for the majority of web development Has it? Or is that "just like your opinion, man"? Any citation? There's some sources that say it's more popular based on things like social mentions, etc, but that's a vanity metric. Perhaps the statement is true if you mean "web development" to be a very limited scope (like SPA using a build step), but I'm not even sure that's true then.
- mynameisvlad 2y agoFor new, modern projects, yes. Very much so. There is practically no reason to choose JS over TS, even for high performance projects where every byte counts and you may want stricter control over the transpilation. The ecosystem has grown to the point where other optimizations like tree shaking do far more, and the improvement in the local dev cycle is insurmountable between the two. Obviously this doesn't apply to existing projects; you're grandfathered into the language barring a pretty big undertaking to move over, but if you go to any competent company doing modern web development on relatively new codebases, they will use TS over JS. And if they don't, as an engineer, you should ask hard questions as to why not. Because if the answer is someone stuck in the early 2000s complaining about OO and strong typing not being needed, then that's completely missing what TS does (and especially what it did when it was released, which was pre-ES5) and how big of an impact it has to speeding up development.
- hactually 2y agoI'm sorry... high performance JavaScript/Typescript?
- jonathanlydall 2y agoI don’t think your comment could be interpreted as anything other than snarky and rhetorical. Nevertheless, it is of course very well known that efficient code in JavaScript will never run as fast as in a language such as C, but choice of language is a trade off, and in whatever language you choose you may also choose to be as “high performance” as possible within it even if it’s still not as performant than if you’d chosen a different language.
- meiraleal 2y ago[flagged]
- mynameisvlad 2y agoYou may want to read up on the HN guidelines and how your comments in this thread don't align with them. If you have something to say about the content of my comment, go right ahead.
- meiraleal 2y agoDid you check the guidelines when you posted this snarky rebuttal? > That’s just like your opinion, man. > Just because you think that doesn’t mean it’s true.