Sign in
Log inSign up

Compiling vs Transpiling

The difference

Rushikesh Chougule's photo
Rushikesh Chougule
·Jan 30, 2022·

1 min read

Compiling vs Transpiling

Compiling is the process of taking source code written in one language and transforming it into another.

Transpiling is the process of taking source code written in one language and transforming it into another language that has a similar level of abstraction.

compVStran.png

Compiling coverts code into lower level executable file (machine code) for computers to execute. As we all know computer doesn't understand code they understand only binary data so, compilers are used to convert higher level of code(human understandable) to the binary file(machine understandable code). Examples of compiled languages are C, C++ and Java which after compiling generates bytecodes or assembly level language which is closer to binary files.

While, Transpiling can be referred as 'source to source' compiler which translates one higher level language to another higher level language. For example, Typescript is higher level language which after transpiling is converted to JavaScript which is also another higher level language. Babel for example can transpile JavaScript ES6 syntax into ES5 syntax to get support from all the older browsers.

End Notes: Hope you like the blog. If you have any suggestions please feel free to comment. Happy Coding! Good Day!

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct