Trusted answers to developer questions

What is a compiled language?

Get the Learn to Code Starter Pack

Break into tech with the logic & computer science skills you’d learn in a bootcamp or university — at a fraction of the cost. Educative's hand-on curriculum is perfect for new learners hoping to launch a career.

A compiled language is a programming language where the source code is translated into machine code and the machine code is stored in a separate file. A compiled language tends to give the developer more control over hardware aspects like memory management and CPU usage. However, the compiled code is hardware dependent.

In a compiled language, the program needs to be rebuilt whenever you make a change.

Some examples of compiled languages are C, C++, and Haskell.

Advantages

  1. All compiled programs are faster as compared to any interpreted code. This is because the code does not need to be compiled while the program is running.

  2. A compiler gives a list of all the compilation errors during compilation. A programmer can fix the errors and execute the code again.

Disadvantages

  1. The entire code needs to be compiled before testing. This increases the overall run time of execution.

  2. The machine code depends on the platform it is running.

RELATED TAGS

general

CONTRIBUTOR

Sarvech Qadir
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?