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