Compiled language
A compiled language is a programming language whose implementations are typically compilers (translators that generate machine code from source code), and not interpreters (step-by-step executors of source code, where no pre-runtime translation takes place).
The term is somewhat vague. In principle, any language can be implemented with a compiler or with an interpreter.[1] A combination of both solutions is also common: a compiler can translate the source code into some intermediate form (often called p-code or bytecode), which is then passed to an interpreter which executes it.
Advantages and disadvantages
Programs compiled into native code at compile time tend to be faster than those translated at runtime due to the translation process's overhead. Newer technologies such as just-in-time compilation, and general improvements in the translation process are starting to narrow this gap, though. Mixed solutions using bytecode tend toward intermediate efficiency.
Low-level programming languages are typically compiled, especially when efficiency is the main concern, rather than cross-platform support. For such languages, there are more one-to-one correspondences between the programmed code and the hardware operations performed by machine code, making it easier for programmers to control the use of central processing unit (CPU) and memory in fine detail.
With some effort, it is always possible to write compilers even for traditionally interpreted languages. For example, Common Lisp can be compiled to Java bytecode (then interpreted by the Java virtual machine), C code (then compiled to native machine code), or directly to native code. Programming languages that support multiple compiling targets give developers more control to choose either execution speed or cross-platform compatibility or usage.
Languages
Some languages that are commonly considered to be compiled:
- Ada
- ALGOL
- ALGOL 60
- ALGOL 68
- SMALL
- BASIC
- PowerBasic
- Visual Basic (to bytecode)
- PureBasic
- C
- C++
- C# (to bytecode)
- Carbon (programming language)
- CLEO
- COBOL
- Cobra
- Crystal
- D
- eC
- Eiffel
- Erlang (to bytecode)
- F# (to bytecode)
- Factor (later versions)
- Forth
- Fortran
- Go
- Haskell
- Haxe (to bytecode or C++)
- Java (to bytecode)
- Clojure[2]
- Scala
- Kotlin
- JOVIAL
- Julia (through JIT)
- LabVIEW, G
- Lisp
- Mercury
- ML
- Standard ML
- Alice
- OCaml
- Standard ML
- Nim (to C, C++, or Objective-C)
- Pascal
- Object Pascal
- Delphi
- Free Pascal / Lazarus
- Modula-2
- Modula-3
- Oberon
- Object Pascal
- Objective-C
- PL/I
- RPG
- Rust
- Seed7
- SPITBOL
- Swift
- Vala
- Visual Foxpro
- Visual Prolog
- Zig
Tools
See also
- Compiler
- List of compiled languages
- Interpreter (computing)
- Scripting language
References
External links
- Compiled Languages at Curlie
![]() | This programming-language-related article is a stub. You can help Wikipedia by expanding it. |
- v
- t
- e