A programming language is simply a textual representation of abstract principles. It is not compiled or interpreted - it is just text.

A compiler will take the language and translate it into machine language (assembly code), which can easily be translated into machine instructions (most systems use a binary encoding, but there are some "fuzzy" systems as well).

An interpreter will take the language and translate it into some byte-code interpretation that can be easily translated into a binary encoding on supported platforms.

The difference between the two is when that change occurs. A compiler typically will convert the text to machine language and package it into a binary file before the user runs the program (e.g. when the programmer is compiling it). An interpreter will typically do that conversion when the user is running the program. There are trade-offs for both approaches.

The whole point here is that the language itself is not compiled nor interpreted; it is just a textual standard. The implementation details of turning that text into machine instructions is where the compilation or interpretation choice is made.

Answer from Zac Howland on Stack Overflow
Top answer
1 of 3
14

A programming language is simply a textual representation of abstract principles. It is not compiled or interpreted - it is just text.

A compiler will take the language and translate it into machine language (assembly code), which can easily be translated into machine instructions (most systems use a binary encoding, but there are some "fuzzy" systems as well).

An interpreter will take the language and translate it into some byte-code interpretation that can be easily translated into a binary encoding on supported platforms.

The difference between the two is when that change occurs. A compiler typically will convert the text to machine language and package it into a binary file before the user runs the program (e.g. when the programmer is compiling it). An interpreter will typically do that conversion when the user is running the program. There are trade-offs for both approaches.

The whole point here is that the language itself is not compiled nor interpreted; it is just a textual standard. The implementation details of turning that text into machine instructions is where the compilation or interpretation choice is made.

2 of 3
8

It's typically compiled, although there is of course nothing preventing people from implementing interpreters.

It's generally wrong to classify languages as either/or; what is the language going to do? It's just a spec on paper, it can't prevent people from implementing it as either a compiler or an interpreter, or some combination/hybrid approach.

🌐
Reddit
reddit.com › r/learnjava › in actual practice, what does it mean to say that a language is "interpreted" vs. "compiled", and how does java relate to both?
r/learnjava on Reddit: In actual practice, what does it mean to say that a language is "interpreted" vs. "compiled", and how does Java relate to both?
June 20, 2022 -

I am in my third programing class in college, and we have only done C++ up to this point. My current class is on Java, and we are learning about how C++ is compiled and Java has a mixture of both compilation and interpretation. Some people are having a lot of difficulty with this idea, especially coming from JavaScript.

I understand that for a language to be interpreted, it means it is read line-by-line, converted, and executed right away; for a langauge to be compiled, it means that the entire source code is translated and the entire file is executed.

My questions:

  • But in practice (i.e. as in actual writing code and developing software), how are compiled languages and interpreted languages different?

  • Also, how is Java both? I haven't noticed any differences from using Java to using C++.

Top answer
1 of 4
65
Most compiled languages read a source code file, process it into native machine code (called object code) and then can also sometimes link the object code with system libraries to create machine-dependent native executable program files. C, C++, and many other languages work this way. Interpreted languages do not have directly executable files, but have a language interpreter that loads the source file and executes the statements therein. Python is an example of an interpreted language. JavaScript is a scripting language, and is closer to an interpreted language, but isn't quite, as it is not designed to be used on its own, but from within another environment equipped with a JavaScript scripting engine, such as a web browser. Java is a little different yet. It is not interpreted, it is a compiled language. However, it is not compiled to native executable code like C or C++. Instead, it is compiled to a bytecode file that is used by the Java Virtual Machine to convert the bytecode into native executable code. It does this so that the Java program is platform agnostic and can run on any system that supports a JVM without needing modifications. You can compare this with running a game console emulator on your computer. The emulator creates a simulated gaming console that runs files containing compiled images of the games (ROM files) and converts that code to run on its host. The important takeaway is that the JVM is not an interpreter or translator; it creates an emulated environment that is always the same, regardless of its host machine or host operating system, so that it can be seemingly platform independent. From a programmer's perspective, there is little difference working with an interpreted language, a compiled language, or a scripting language. The process is the same. You write human-readable code, and it gets executed on a machine. It is only the parts in-between those two that differ. Historically, languages that compile to native code allow the programmer the most flexibility because they can take advantage of every aspect of the machine they are programming. Interpreted languages strip away some of that flexibility in order to have a "least common denominator" approach to running the programs, and scripting languages are the most restrictive still, usually removing any ability whatsoever to directly access the host machine or its operating system and/or working with a limited set of features.
2 of 4
3
This will overlap with u/caphill7 's response a little. for a language to be compiled, it means that the entire source code is translated and the entire file is executed. for a language to be interpreted, it means it is read line-by-line, converted, and executed right away. There are several nuances to the definitions of interpreted and compiled and neither of the statements above are quite right. Compilation is the act of translating one language into another. Some compilers actually do this conversion through multiple language stages (from source, to an intermediate representation language, to a final language). The final output language may or may not be native-code. A unit of 'native' code is not necessarily executed in its entirety (eg some code path may not be used) and not of all the code executed is necessarily in a single file (the code may be one of several libraries dynamically loaded). Executing a 'scripting language' isn't really 'line-by-line. The interpreted/compiled distinction doesn't hold as well as it used to. Let's call one group of languages 'native code languages'. These use a compiler whose final output stage is native code (machine object code). C, C++, pascal, rust and many others fall into this group. most often, these produce a single unit of execution (an executable file). Another group of languages are 'scripting languages'. These languages use an 'interpreter' that reads source at runtime. However it is not true that all (or even many) of these execute the source directly, many employing one or more tokenisation and compilation steps first (sometimes) to produce either an intermediate language or native code to execute (but usually without outputting an executable file). Python, JavaScript and many others fall into this group. It should be noted that JavaScript, where the interpreter is built into the browser, is often compiled 'just in time', to native-code, before execution. Other scripting languages do this too - the trade off is the execution delay (while compilation happens) vs the performance improvements of native-code (where low-level optimisation can take place). Another group of languages are 'portable compiled languages'. These are compiled languages whose compiler output is an intermediate language. They require a 'runtime' on the target platform to execute the application, but execution may or may not execute the intermediate language directly - several include one or more 'just in time' compilers than selectively compile the intermediate language to native code. Java falls into this last group. Java source is compiled by the Java compiler to byte-code Byte-code is loaded by the Java Virtual Machine (JVM) - one unit per class/type but often packaged into a file per archive or module. The JVM May use an interpreter to execute byte-code May use one or more Just-in-time compilers to compile byte-code to native code with varying degrees of optimisation. May choose to recompile code if it looks like different optimisations should apply. Java uses statistics, of how the code is run, to guide the native-code optimisation. This means that running the same application with two very different data-sets, might choose to compile to native-code very differently. Languages like C/C++/Rust can do a similar thing with something called 'profile-guided optimisation' - but they have to choose a representative dataset, which may not match the data actually used. And newer releases of the Java Virtual Machine can improve the optimisation and execution of older byte-code. On the other-hand, Java optimisation has to be fast, and exist within the resource constraints of the execution environment. It has a much more limited time and space budget than a C++/Rust optimising compiler. Additionally the 'runtime' itself, just by its presence, takes up resources that the application could use to solve the applications computational exercise. In practice, most of the code you run in Java, for any long-running process, will be native-code produced by the fast C1 HotSpot Just In Time compiler, or native-code produced by the more aggressively optimising C2 JIT compiler. The interpreter will be used until C1 has compiled the code in question, or if code is de-optimised (to allow C2 to re-optimise it to respond to changing execution statistics).
Discussions

Is C # an interpreted language?
Until you find a C# interpreter, it is not an interpreted language. ... In the context of computer languages, there is no official (or standard) definition of compile, translate and interpret. More on learn.microsoft.com
🌐 learn.microsoft.com
6
0
August 23, 2021
Is Objective-C an Interpreted or Compiled language? - Software Engineering Stack Exchange
I want to know if Objective-C is an interpreted or a compiled language. More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
July 19, 2011
Is Objective C compiled or interpreted?
Objective C is a compiled language. Code written in Objective-C is compiled into machine code using a compiler like Clang, producing binaries that… More on lemon.io
🌐 lemon.io
1
December 11, 2024
In actual practice, what does it mean to say that a language is "interpreted" vs. "compiled", and how does Java relate to both?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full - best also formatted as code block You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/learnjava
6
25
June 20, 2022
🌐
GeeksforGeeks
geeksforgeeks.org › compiler design › difference-between-compiled-and-interpreted-language
Difference between Compiled and Interpreted Language - GeeksforGeeks
July 12, 2025 - A compiled language is a programming language that is generally compiled and not interpreted. It is one where the program, once compiled, is expressed in the instructions of the target machine; this machine code is undecipherable by humans.
🌐
Quora
quora.com › Is-C-a-compiled-or-interpreted-language
Is C a compiled or interpreted language? - Quora
It’s well-documented. Most of the implementations are compilers, but there had been at least one interpreter. I wouldn’t be particularly surprised if there are more. There are some features of programming languages that can only be implemented...
Top answer
1 of 2
33

It is neither. Objective-C is a programming language. A programming language is an abstract concept. A programming language is a set of mathematical rules and definitions. Programming languages aren't compiled or interpreted, they just are.

Compilation and interpretation aren't properties of a programming language, they are properties of, well, a compiler or an interpreter (duh). Every language can be implemented by a compiler and an interpreter, and most languages have both compiled and interpreted implementations. In fact, the majority of modern language implementations utilize both an interpreter and a compiler in the same execution engine for maximum performance.

For Objective-C specifically, I know of three implementations: gobjc, clang and oscompiler, but a quick Google search turned up two more. Of those five implementations, three are compilers and two are interpreters.

2 of 2
1

From Wikipedia:

Some language specifications spell out that implementations must include a compilation facility; for example, Common Lisp. However, there is nothing inherent in the definition of Common Lisp that stops it from being interpreted. Other languages have features that are very easy to implement in an interpreter, but make writing a compiler much harder; for example, APL, SNOBOL4, and many scripting languages allow programs to construct arbitrary source code at runtime with regular string operations, and then execute that code by passing it to a special evaluation function. To implement these features in a compiled language, programs must usually be shipped with a runtime library that includes a version of the compiler itself.

I think clange (the main objec compiler) ship with a runtime library to achieve the dynamic nature of the objective-c the language.

🌐
Wikipedia
en.wikipedia.org › wiki › C_(programming_language)
C (programming language) - Wikipedia
November 10, 2001 - Several C or near-C interpreters exist, including Ch and CINT, which can also be used for scripting. When object-oriented programming languages became popular, C++ and Objective-C were two different extensions of C that provided object-oriented capabilities. Both languages were originally implemented as source-to-source compilers; source code was translated into C, and then compiled with a C compiler.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › compiler design › difference-between-compiler-and-interpreter
Difference Between Compiler and Interpreter - GeeksforGeeks
July 12, 2025 - Interpreted Language is more flexible than a Compiled language. The interpreter can run only the corresponding Interpreted program.
🌐
DEV Community
dev.to › gridou › interpreted-vs-compiled-languages-understanding-the-difference-4ak8
Interpreted vs. Compiled Languages: Understanding the Difference - DEV Community
March 13, 2025 - Some programming languages use hybrid approaches, combining the benefits of both interpreted and compiled languages. Two major techniques used in modern programming environments are Ahead-of-Time (AOT) Compilation and Just-In-Time (JIT) Compilation.
🌐
Wikipedia
en.wikipedia.org › wiki › Compiler
Compiler - Wikipedia
20 hours ago - The categorization usually reflects the most popular or widespread implementations of a language – for instance, BASIC is sometimes called an interpreted language, and C a compiled one, despite the existence of BASIC compilers and C interpreters.
🌐
Roboflow
stevengong.co › notes › Compiled-vs-Interpreted-Language
Compiled vs. Interpreted Language
Compiled vs. Interpreted language There are two ways to go about our code. In C/C++, we typically compile the source code into the local OS / hardware-specific language (i.
🌐
University of North Carolina
cs.unc.edu › ~bbb › comp524 › doc › 03CompilationAndInterpretation.pdf pdf
Compilation and Interpretation - UNC Computer Science
➡For example, the Tiny C Compiler (tcc) can be used as an interpreter. ... Trivial compilation is always possible.
🌐
Medium
medium.com › @rohitdeshpande9922 › programming-languages-arent-compiled-or-interpreted-5c1ed4023a76
Programming Languages aren’t compiled or interpreted !! | by Rohit Deshpande | Medium
August 14, 2023 - And they are taught that the language is either compiled, interpreted or uses JIT. Generally they know that languages like C, C++, are compiled whereas languages like JavaScript, Python are interpreted.
🌐
Tutorialspoint
tutorialspoint.com › cprogramming › index.htm
C Tutorial
C is a compiled language, whereas programming languages like Python, Java and JavaScript are interpreted languages. C is a statically typed language. On the other hand, Python and JavaScript are dynamically typed languages.
🌐
EBSCO
ebsco.com › research-starters › computer-science › computer-languages-compilers-and-tools
Computer Languages, Compilers, and Tools | Computer Science | Research Starters | EBSCO Research
The process of programming typically ... which is then converted into executable code via compilers or interpreters. Compilers translate the entire code into machine language before execution, while interpreters convert it line-by-line, offering a faster alternative during runtime. The development of computer languages has been closely tied to ...
🌐
Sololearn
sololearn.com › en › Discuss › 2905639 › what-language-to-use-for-a-gui-application
What language to use for a GUI application?
October 16, 2021 - Sololearn is the world's largest community of people learning to code. With over 25 programming courses, choose from thousands of topics to learn how to code, brush up your programming knowledge, upskill your technical ability, or stay informed about the latest trends.
🌐
Lemon.io
lemon.io › home › questions and answers › objective c › is objective c compiled or interpreted?
Is Objective C compiled or interpreted? - Lemon.io
December 11, 2024 - The question is about Objective C · Answer: Objective C is a compiled language. Code written in Objective-C is compiled into machine code using a compiler like Clang, producing binaries that run natively on Apple devices.