JavaScript is not viable any more

JavaScript is a dominant language for building web applications. I’ve been using it for a very long time. However, in my opinion, it just doesn’t cut it any more. Luckily, there are some compelling alternatives. JavaScript: A Dominant Yet Flawed Language JavaScript offers a quick and cheap solution for building web applications in the short term. However, in the long run, its design quirks and inherent flaws will work against its users. JavaScript is ignorant and designed to handle any input without complaint, which leads to its quirky behaviour and unpredictability. I wrote about it in my previous post. ...

November 9, 2023 · 5 min

TypeScript inherits all the flaws of JavaScript

Being a big proponent of TypeScript, I keep noticing that this language inherits all the flaws of JavaScript. However, it does not mean we have no choice. The problem Consider a function that turns an object representing a URL into a string: type UrlRecord = { protocol: string; host: string[]; } function urlToString(urlRecord: UrlRecord): string { const { protocol, host } = urlRecord; return `${protocol}://${host.join('.')}`; } This code snippet looks innocent and pretty solid. TypeScript compiler will let the users of this function know if they are passing the wrong data into the function: ...

October 30, 2023 · 6 min

Is JavaScript OOP or Functional?

A colleague of mine asked a good question: does TypeScript make JavaScript a better OOP language? To answer this question, I decided to compare OOP JavaScript to its opposite, Functional JavaScript. TypeScript has become crazy popular. Many people bet on it as a magical language that will solve their JavaScript problems. Well, it won’t. As Kyle Simpson described in his upcoming book, the quirks of JavaScript don’t disappear. In my opinion, we should not attribute any superpowers to TS apart from just helping developers to feel more confident in the larger codebase. As we know, all the type annotations are wiped out, and all we have left is pretty much JavaScript. Yes, the compiler may add some boilerplate code, like the inheritance implementation (depending on what is in the tsconfig.json file). ...

August 31, 2022 · 3 min