DEV Community

Cover image for Alternatives to JavaScript
Bello Osagie
Bello Osagie

Posted on • Updated on

Alternatives to JavaScript


JavaScript is written in C++, including engines like Spider Monkey, V8, Chakra, etc. That is, JavaScript codes are compiled to machine codes, but C++ binding is used in runtime between the browser and the engine.

Since browsers only support JavaScript, other programming languages can be transpiled to JavaScript before the C++ binding can be done successfully.

Codes can now be transpiled from languages like TypeScript, Dart, etc. to JavaScript then compiled to machine codes in the JavaScript engine

More on browsers and engines C++ binding later

Below are alternative languages to JavaScript:

It is advisable to know JavaScript fully well before learning other alternatives to JavaScript.

A high-level language like JavaScript is abstracted from the machine level. Check out the Freecodecamp article to learn more.


Buy me a Coffee


TechStack Media | Bluehost

  • Get a website with a free domain name for 1st year and a free SSL certificate.
  • 1-click WordPress install and 24/7 support.
  • Starting at $3.95/month.
  • 30-Day Money-Back Guarantee.

Learn more

Top comments (7)

Collapse
 
epsi profile image
E.R. Nurwijayadi • Edited

There is another way.

  1. In frontend web browser you can use WASM
  2. While in backend CLI you can utilize native NodeJS using N-API

For example this rust code as native nodejs.

🕷 epsi.bitbucket.io/lambda/2020/12/2...

Rust as Native NodeJS using N-API

In NodeJS world. we see movement from javascript to native nodejs.

But strange that I haven't seen it in Deno.

Collapse
 
myzel394 profile image
Myzel394 • Edited

You can't replace Javascript with WASM. WASM was never intentioned to replace Javascript nor does it. WASM is only really required when you're using complex Mathematics (like when you're developing a 3d game that calculates sun reflection or doing a video cutter, etc.). WASM also cant access the dom.

Collapse
 
bello profile image
Bello Osagie

Thanks for the info.

Collapse
 
bello profile image
Bello Osagie

Thanks, it is really nice. I will try that. Lovely!!! 😊

Collapse
 
epsi profile image
E.R. Nurwijayadi

Thank youuuuuu.

Collapse
 
hi_artem profile image
Artem • Edited

One small detail. Although most JS runtimes, like V8, are often written in C++, JS itself is not compiled into C++. However, there is C++ API allowing to interact with the runtime.

Collapse
 
bello profile image
Bello Osagie

That's nice info. Thanks for the update.