What is the difference between scripting languages and compiled languages?



  • C, C++, and Java type languages are compiled languages.

    This means that the source code is translated into object code and then execute on the computer hardware. After compiling you end up with binary files, the executable files that run on your computer.

    This is an example of an executable file.

    $ file /bin/cat
    /bin/cat: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, ....stripped
    

    Scripting languages such as shell scripting (bash, ksh, etc), perl, php, etc, are interpreted languages. There is one interpreter binary that translates the code in your script into the form the interpreter requires and then executes it.


Log in to reply
 

© Lightnetics 2024