What is the difference between Compiling, Interpreting and Transpiling?

Programming Answer

Click here to type your answer

Safarov answered

Compiling is transforming source code of project from high level language to lower level language. For example code we write C++ is high level programming language that's why we need to have compiler to convert it language that machine understands.

Interpreting can be defined as sending chunks of code to machine each time (in some cases line by line). It's more interactive related to compiler which transforms whole code at once and saves as a file - which is later run by computer. JVM (java virtual machine) is a interpreter which reads bytecode and send to machine runtime. In the other hand javac is a compiler which compiles Java source code to Java bytcode (then to be interpreted by JVM).

Basically Transpiling is a converting source code to another language, where both languages have same level of abstractions. That's the only difference between compiling/interpreting to transpiling, because compiling generate code to more computer readable format (decrease abstraction). For example Typescript (developed by microsoft) is a scripting languages and in order to run in the browsers we transpile it to Javascript. Both Typescript and Javascript are high level scripting languages. I enjoy writing in Typescript because it has class implementation and error checking. Also have heard about Babel - but didn't use it.

0 points