Questions tagged [interpreted-language]

Questions about interpreted languages and program interpretation in general. A language implementation is interpreted if programs are executed by another program (the interpreter) as opposed to being transformed (compiled) into code that is directly executed by the machine.

An interpreted language is a programming language in which programs are "indirectly" executed (interpreted) by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then "directly" executed by the host CPU.

Theoretically, any language may be compiled or interpreted; this designation is applied purely because of common implementation practice and not some essential property of a language. Indeed, for some programming languages, there is little performance difference between an interpretive, or compiled-based approach to their implementation.

For more information, see the Wikipedia entry about interpreted languages.
See also .

158 questions
4
votes
2 answers

What does it mean for a language to be ‘interpreted’?

Do languages like e.g. Ruby (if running MRI, I mean not compiled to byte-code) run actually parsed everytime when an execution of, e.g., method or loop body is needed? I mean, to execute a loop, you need to parse its body N times? I just always…
4
votes
2 answers

When implementing an interpreter, is it a good or bad to piggyback off the host language's garbage collector?

Let's say you are implementing an interpreter for a GCed language in a language that is GCed. It seems to me you'd get garbage collection for free as long as you are reasonably careful about your design. Is this generally how it's done? Are there…
Mark Bolusmjak
  • 23,606
  • 10
  • 74
  • 129
4
votes
4 answers

What is the property of the C# language that makes reflection possible?

What is the property of the C# language that makes reflection possible? Is it something that all object oriented language can do or is it something that all interpreted language can do? Or something else...
Bastien Vandamme
  • 17,659
  • 30
  • 118
  • 200
3
votes
2 answers

What do "IS" "IL" and "IEXT" refer to in the RDF Semantics specification?

These terms are used in the "Definition of a simple interpretation" table on http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#interp . I am a little unclear on their meaning. At this point I think they mean, Intermediate Language, I am a little…
smartcaveman
  • 41,281
  • 29
  • 127
  • 212
3
votes
1 answer

Creating dynamic data-type in C++

I'm creating an interpreter of a particular language in C++. After creating a parser, implementing scope resolution etc., the only problem I have is implementing dynamically typed variables. Following some general advice scattered around, I created…
Fronez1
  • 33
  • 4
3
votes
1 answer

Is the OCR Computer Science GCSE wrong about compilers and interpreters?

I'm a secondary school student currently taking the OCR Computer Science GCSE (J276). I taught myself to program and was recently surprised by the context of a question in one of OCR's specimen papers (this one) as it goes against my knowledge of…
user9220358
3
votes
1 answer

How do Python implementations handle context swap during function calls?

I am trying to create a heavily modular and data-driven program in python, and I'd like to have calls between modules go through a central proxy singleton instead of every object holding references to objects they communicate with. The main reason…
Althis
  • 181
  • 6
3
votes
2 answers

Language interpreted from source code vs. bytecode in Web

Assuming a program is written in 2 different languages: In a language interpreted from source code (PHP for example) In a language interpreted from bytecode (Java for example). The two program do exactly the same (for simplicity, lets say they…
Joel
  • 5,949
  • 12
  • 42
  • 58
3
votes
4 answers

Fast interpreted language for memory constrained microcontroller

I'm looking for a fast interpreted language for a microcontroller. The requirements are: should be fast (not crucial but would be nice) should be light on data memory (small overhead <8KB, excludes program variable space) preferably would be small…
Thomas O
  • 6,026
  • 12
  • 42
  • 60
3
votes
4 answers

Compilation vs. Interpretation, Python has unexpected behaviour

I get an unexpected behavior of python execution. if True: print("Hello") else: I am an error. what can you do about it? Now, this code doesn't raise a SyntaxError because the control never goes into the else statement. In compiled…
3
votes
1 answer

Interpreted language in Java and calls to Java methods

I have implemented simple interpreted language with dynamic typing in Java. Unfortunately I ran into the following problem. When testing the following code: def main() { def ks = Map[[1, 2]].keySet(); return ks.size(); } I stumbled upon the…
3
votes
1 answer

interpreting a script through F#

I really like F# but I feel like it's not succint and short enough. I want to go further. I do have an idea of how I'd like to improve it but I have no experience in making compilers so I thought I'd make it a scripting language. Then I realized…
Preza8
  • 400
  • 1
  • 3
  • 13
3
votes
1 answer

Are all scripting languages interpreted?

Are all scripting languages interpreted? I haven't come across a compiled + scripting language yet. the following languages are both interpreted and scripting languages. what is the connection between interpreted languages and scripting…
DesirePRG
  • 6,122
  • 15
  • 69
  • 114
3
votes
1 answer

Why is there such a clear cut between interpreted and compiled languages?

When learning a compiled language like C or C++, you get to know the compiler. In order to run your code, you have to compile it first. Compiling your code translates it from a textual representation into something that can be executed. The…
bastibe
  • 16,551
  • 28
  • 95
  • 126
3
votes
2 answers

Tracing lambda expression evaluation

I am having trouble with some tricky-looking lambda expressions in Scheme, and I would like to see how they are being evaluated by the interpreter. I would like the Scheme interpreter to print all the evaluation steps, as seen in SICP Section 1.1.5,…