Is it a recent trend to write JavaScript tools in other languages?
- May 25, 2021
- Posted by: Aelius Venture
- Category: Coding
We’ve recently seen an increase in JavaScript tools written in languages other than JavaScript. This blog post gives a few examples and discusses why not using JavaScript is appealing.
JavaScript tools examples
We posed the question on Twitter, and the following are some of the responses:
Build compilers and tools:
- esbuild – Go: It is a JavaScript bundler and minifier which encapsulates JavaScript and TypeScript code for web delivery.
- Snowpack, Vite, and Hugo all use it.
- swc – JavaScript/TypeScript compiler in Rust.
- Google Closure Compiler – Java: Checker and Optimizer for JavaScript.
Linters and code formatters:
- RSLint is a JavaScript linter written in Rust.
- Flow is a static type checker for JavaScript written in OCaml.
- dprint is a code formatting platform for Rust.
Using command-line utilities:
- Fast Node Manager (fnm) is a Node.js version manager written in Rust.
- Manage JavaScript command-line tools such as node, npm, and yarn with Volta – Rust.
Why other languages for JavaScript tools?
What are the advantages of not using JavaScript (or languages that compile to JavaScript)?
- They can be compiled into native binaries, which run faster.
- Native binaries are often usually much faster than JavaScript.
- Parallelization is greatly simplified in many languages.
Additionally, several non-JavaScript languages can now be compiled to WebAssembly, resulting in binaries that are almost as portable as JavaScript – and fit well with it.
A non-JS language might also be better suited for a given mission, given that each language has its own specialties. For example, algebraic data types are supported by OCaml/ReasonML, Haskell, and other functional languages, which aid in the processing of data structures such as abstract syntax trees, which are used while parsing and/or compiling formal languages.
Advantages with JavaScript tools
There are other advantages of using JavaScript:
- It’s easier to find tool contributors: On the one hand, programmers who are familiar with non-JS languages are less likely to work on JavaScript-related software. A non-JS language, on the other hand, is a significant barrier for JavaScript programmers.
- You can “dog-food” a language tool by applying it to the tool’s code. As a result, working on the tool’s codebase allows you to better understand what you want from it.
- With a language specification, extensive documentation, useful resources, and numerous libraries, JavaScript has a thriving ecosystem (via npm).
- TypeScript isn’t as elegant as specialized languages for functional programming, but it’s similar enough without sacrificing the JavaScript ecosystem. Discriminated union types, for example, are somewhat more verbose than algebraic data types, but they have many of the same advantages (such as compile-time exhaustiveness checks).
AssemblyScript may be a good choice if speed is a priority: It’s a TypeScript version that’s compiled into WebAssembly.
The trend of JS tools written in other languages
Stay Connected!
-
AI in Industrial Data: Boosting Efficiency and Innovation in 2025
How AI is Unlocking Industrial Efficiency Through Big Data Home As we move into the fourth industrial revolution, artificial intelligence is at the centre of the digital transformation process. Numerous sensors, machines, and processes in industrial settings are now responsible for the generation of enormous amounts of data. Artificial intelligence is the key to transforming
April 14, 2025 -
Top Ways AI is Powering Financial Data Analysis in 2025
The Role of AI in Transforming Financial Data Analytics Home In the world of finance, data is essential to success. There are billions of transactions, trades, and payments that take place across systems all over the world every single second. There is both opportunity and risk associated with this tidal wave of data. Enter the
April 14, 2025 -
How AI is Transforming Medical Data into Life-Saving Insights
How AI is Transforming Medical Data into Life-Saving Insights Home The field of medicine is undergoing a rapid transformation as a result of artificial intelligence (AI). By analysing complex healthcare data with an unprecedented level of accuracy and speed, artificial intelligence is opening up new possibilities in a variety of areas, including early diagnosis and
April 14, 2025