DEV Community

Cover image for Alternatives to JavaScript
Bello Osagie
Bello Osagie

Posted on • Edited on

8 2

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

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

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
 
secure_daily 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.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay