Compiling vs Transpiling
You might have heard about compiler, may be unfamiliar to transpiler: let’s deep dive in both and making an approach to transpiling and compiling.
Get AJIT SHARMA’s stories in your inbox
Join Medium for free to get updates from this writer.
Before understanding Transpiling and compiling we should make a direct focus on compiler and transpiler.
COMPILER
Compiler is the term which is used to describe a program that takes our programmable code written in a particular language and convert it into human readable format or we can say convert it into some other language.
Like we have heard about the gcc compiler which we use for compiling our source code written in C language, and produces binary executable, machine familiar as output.
TRANSPILERS
Transpilers are known as source to source compiler as its name indicates it basically transplant the same language source code into it different version set but without changing the surroundings.
For example : ES6 is latest
and ES5 is its older version, most of the browser engine support the old version of ECMA. So developers use transpiler in order to maintain the compatibility of the browser and the process is known as Transpilation.
Some of the tranaspilers are Emscripten(transpiles C/C++ to javascript), Babel (Transpiles ES6 to ES5 ).
Now we can say that compiling is a general form for moving the source code written in one language to another.
Transpiling is a specific term for transforming the source code written in one language to another language, that has a similar level of abstraction like we discussed earlier.







