It's crazy that I love JavaScript so much because I struggle to find what it's really best used for. It is "performant" with JIT engine but this causes small programs to require large memory footprints. You can run it without JIT to reduce memory footprint but this comes with a massive performance hit (for some reason people use embedded JavaScript to make videogame UIs with React, lmao).

(Or you can be the Battlefield 1 development team, who used JavaScriptCore, which is Safari's JS engine, as their engine for their main menu UI. JavaScriptCore doesn't use JIT when it's used as an "app" so you get the worst of both worlds. They apparently had many memory problems often during development.)

Of course, JavaScript is the language of the web which is why it is such a popular and useful language, but the emergence of WASM as a compilation target makes me wonder if JavaScript will be better served in the future as a glue language like it was originally intended to be.

I like JavaScript because of "developer experience" concerns and personal taste. I love the JavaScript object. I love how it ergonomically it supports functional programming (if only proper tail calls were consistently optimized by engines). I love dynamically-typed languages for some reason. But I don't think that a language should be used because it is fun for me to write in. A language should be used if it is the right tool for the job.

For high-level code where performance and memory are not of critical concern, I suppose JavaScript is an adequate choice, but I also am not sure it's really the "best" option for anything other than web development.

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.