DEV Community

sai bhargav
sai bhargav

Posted on

Transpiler vs Compiler

Hey there again we meet today hope you are doing well in this pandemic as yesterday i told about that today we gonna disscuss about transpiler and compiler so put your seat belt and stay focussed 😂

Transpiler::

Transpiling is a specific term for taking source code written in one language and transforming into another language that has a similar level of abstraction.

For example lets take babel which it converts every es6 or es6+ code in to es5 code which every browser can perform its task by fully functionality so this is how transpiler works

Some examples of transpilers:

Emscripten: Transpiles C/C++ to JavaScript

Babel: Transpiles ES6+ code to ES5 (ES6 and ES5 are different versions or generations of the JavaScript language)

Compiler::

Compiling is the general term for taking source code written in one language and transforming into another.

For example lets take the famous gcc editor which runs c programs here its take program only in one language but it gives the ouput in many forms

now a fomo(fear of missing out) may be created about the word abstraction lets discuss about it the

Abstraction::

Abstraction is the property by virtue of which only the essential details are displayed to the user. The trivial or the non-essentials units are not displayed to the user. Ex: A car is viewed as a car rather than its individual components. so this is what we call abstraction so a compiler or a transpiler doesnt understand about our english language which is also called as high level language so we have to convert that into binary code which is also called as low level code by this way we can perform all operations to get a better understanding you have to read about levels of abstraction and levels of language so thats all for today catch you next time and have a great day.....

Top comments (0)