The author never actually says what is so wrong with JavaScript. I think it is quite a good dynamically typed language, and it certainly has some very high-performance implementations. If you don't like it, just use something else?<p>> Ultimately, JavaScript was the right thing at the right time. It ended up being folded, spindled, and mutilated to serve purposes that it isn’t well suited for<p>Counterpoint: many quirks in the language were addressed, e.g. introduction of === and with ESLint you get many of the practical advantages of a type checker. And when you need more safety, sprinkle TypeScript on top.<p>What I really want for Christmas is a TypeScript-to-native compiler.
This is a plea to use TypeScript instead of JS. Why not. Strong typing is certainly great. But the reason I don't use TypeScript isn't any of those listed: it's because it needs a compilation step, and I don't want that.
I'll happily use TypeScript for all my UI components, libraries and server code, most of the time with Bun thanks to its OOB support for TypeScript.<p>But for Web UIs I'll drop down to a #NoBuild "Simple, Modern JavaScript" [1] i.e. using JS Modules + JSDoc Type Annotations to avoid needing any npm modules/build steps/etc. I still benefit from a library's TypeScript definitions/VS Code intelli-sense/static analysis/etc but completely avoid any build/bundling complexity for the cost of a slightly more verbose syntax in JSDoc type hints.<p>I'd happily move to using ECMA Type Annotations proposal [2] if it ever got accepted, but alas TC39 moves slowly...<p>[1] <a href="https://servicestack.net/posts/javascript" rel="nofollow">https://servicestack.net/posts/javascript</a><p>[2] <a href="https://github.com/tc39/proposal-type-annotations">https://github.com/tc39/proposal-type-annotations</a>
I don't get the "type checking is the solution for the problems of the world". A lot of good things were/are written without type checking. Most of the problems I see in production have nothing to do with the wrong type being used or some forgotten required parameter.
Also, typescript is just javascript with a mustache. It's the same thing
I have said no to Javascript for over 20 years for reasons having nothing to do with the language. I actually like the way Javascript looks because it looks much like C. I have no problem with the Javascript language.<p>But Javascript is the language of choice for programs (scripts) that I do not care to run. By default, these undesired Javascripts are executed automatically with no user input when one uses a so-called "modern" web browser.<p>As such, I do not run Javascript. As it happens, the language is closely associated with the so-called "modern" browser, a program that I consider too big, too complex and too dificult to control. It takes far too long to compile, assuming the source code is even available.<p>I am submitting this comment without using a "modern" web browser.
"Typing everything allows you to clearly and succinctly declare intentions with your code as well as enforce those intentions throughout your code base. For an application with many developers, being able to clearly and definitively express what code does is a huge advantage over code that requires a fellow developer to spend cognitive energy to figure that out."<p>Types are definitely useful in the fight to 'make invalid states impossible', but this rather overstates the case. They go only a very little way in documenting intent.
I never understood people discussing JS and TS as different entities. TS is JS, but with types. But to be fair I can't imagine now using untyped JS without an LSP of some sort.
I don't see JavaScript as the webbrowsers assembly, and whilst it can be, don't agree that the web browser is the new operating system. These are the two predicates used to justify the author's argument to use typescript.<p>I don't have a problem using typescript, but prefer dart if you need a strongly typed (null safe) language.
I think the flexibility of JS forces you to be intentional with your code composition in order for it to not be a huge mess, which makes better programmers. With that being said, many programmers don’t want to think that hard so they rely on railroaded overly opinionated languages or write bad JS
JavaScript is a very capable language. It has better functional programming support than Java and Python. It has fewer footguns that C++. You can start with a scrappy prototype then gradually add type-checking later. Of the mainstream languages, it's actually one of the better ones!
The author seems to ignore the fact that type hints are a thing even with plain JS. Serious question: does the author "just say no to Python" as well?<p>If lack of explicit typing is the issue, then his rant would apply to most scripting languages and to single out JS seems odd to me...
Translation: type less languages get messy when the project size grows. This is not only about javascript, it's also about python and whatever else is in fashion.<p>Still, the title is disappointing because switching to a type checked dialect of JS won't fix the bloat issues that are fundamental to the browser as a platform.
How disappointing.<p>It is not at all "say no to JS". It's "use my preferred flavour of JS instead."<p>I want to return to the pre-JS internet and especially the pre-JS Web.<p>Say no to Javascript <i>at all</i> in any variant. Also say no to PHP. Nothing of lasting value to humanity would be lost if both of them went away completely, forever.
I thought this was a parody of Guardian-style opinion columns at first. You know, <i>"I have a strong opinion and here are Y meandering and mildly amusing/lighthearted reasons why"</i> op-eds.<p>I <i>like</i> opinion columns and would love to see more about software development, but this one feels like it's going for the lowest of hanging fruit. Anyone who cares about JavaScript either way will already have an opinion and won't be won over by a humorous take.<p>I do like the author's style though, so don't interpret this as crapping on his work. Looking at the "More from this author", it seems this is his genuine style, and I found some of his other pieces to be good reads. More please.
I was disappointed to read this is just a "Use TypeScript" instead.<p>Look, you can hot glue and tape all the types you want, but it is still JavaScript. No amount of compiler-enforced comments is changing that.
I'm a fan of TS, and have no issue with people's opinions on programming languages. But come on, the whole "built in a week" thing is pretty tired at this point. There have been many, many major iterations on Javascript since the 90s. There's nothing inherently wrong with vanilla JS these days. It has a few quirks like every language does, but overall generally does what you expect it to do.
This kind of rant, culminating in a hackneyed "created in a week" insult, usually comes from backend developers who jumped into frontend work thinking it was a silly little thing that could be mastered in under an hour, discovered that it was a whole separate field, and still failed to adjust their priors.<p>This time it comes from a "former Delphi product manager" turned clickbait writer. I just hope that my visit with adblock enabled didn't generate any form of income for him or his website.