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
0
votes
0 answers

Are syntax errors in Python found at 'compile time' or 'runtime'?

This is straight out of a question I had in a school exam. The question goes: In the Python Programming Language, syntax error is detected by (a) at (b). (a) and (b) are: (a): interpreter, (b): compile time (a): interpreter (b): runtime Syntax…
0
votes
1 answer

How does python determine whether to categorize a variable as local or non-local in a function?

Running this code prints 2. x = 2 def foo(): print(x) foo() However, running this code returns an UnboundLocalVariable exception when I attempt to print x. (Line 3). x = 2 def foo(): print(x) x = 10 foo() Python is an interpreted…
amdson
  • 1
0
votes
1 answer

Why don't most interpreted languages like ruby provide an optional compiler?

Are all interpreted languages not eventually machine code? I'm curious if the reason is because companies don't think it's worth the effort, if there is an inherit conflict that makes it impossible, or some other reason. Is there a way to capture…
user9280731
0
votes
2 answers

php as interpreter language or compiled

Possible Duplicate: Is PHP compiled or interpreted? I am little confused with the words used with PHP. I know PHP is a scripting language. Some times I read it is interpreted or some time it is compiled! How?, Is it something to do with when it…
user269867
  • 3,266
  • 9
  • 45
  • 65
0
votes
1 answer

Compiler and Interpreter preferable

When is a compiled language more preferable to an interpreted language and vice versa ? I know compiler compiles the whole code at once and produces the object code whereas interpreter interprets the code line by line. When is one more advantageous…
0
votes
2 answers

How would I implement this case CallE which will have the intrepeter to test function calls?

I am improving on some Haskell but have become stuck down trying to write an interpreter for testing language which tests math and relations. I have tested all data type cases but CallE. I believe I must make a new environment and map values using…
0
votes
1 answer

Run time optimisation in Javascript

Do the main Javascript interpreters have any built in optimisation at all? I'm thinking of very simple cases like while(i < array.length) { ... }
0
votes
0 answers

How are interpreted languages segmented into code section of interpreter / VM?

Every program needs to have a Code Section segment. Is this code segment read only? If so, how are dynamic changes implemented, such as the use of a dynamic library? Also, how is the interpreter making changes to the read only code section? If it's…
0
votes
1 answer

What interpreted language can i leverage for debugging?

I spoke about developing a programming language. Instead of making it compiled i am considering making it interpreted. So what i like to do is parse the syntax myself, build the AST and output source in an existing scripting language. The thing i'd…
user34537
0
votes
2 answers

Dependency injection to class-method in ABAP

I have a scenario where my class method (A) calls another class method (B). So A is depended on B. I’d like to get rid of the dependency to be able to run unit tests. Decoupling and dependency injection are somewhat based on instantiation. But class…
0
votes
1 answer

Why do Python modules altered during execution persist over separate files?

Sorry for confusing title, let me explain what I mean. I came across a piece of code similar to the following using Google's PrettyTensor API, where it allows for custom functions to be added to the PrettyTensor class through its…
0
votes
1 answer

Data files when using intepreted languages

Say I have some data which I want several kinds of. I think the easiest example could be tiles in a game: I would have grass, rock, tree, etc. each with different sets of values. I would immediately go ahead and make a file and read it in at…
0
votes
1 answer

Reasons and history for choice of common comment signs

Most of the programming languages use // or # for a single line comment (see wiki). It seems to be that # is especially used for interpreted languages. According to this question the reason for that seems to be that one of the early shells (bourne…
0
votes
1 answer

JavaScript compilation in V8

In the V8 home (the Google's JavaScript engine) we read this: V8 compiles and executes JavaScript source code Does it mean that JavaScript is not an interpreted language in V8? Does V8 use a just-in-time compilation approach for…
Boni García
  • 4,618
  • 5
  • 28
  • 44
0
votes
2 answers

Simple Interpreted Language Design & Implementation

I need some resources for implementing a simple virtual machine and interpreted language. Something that is pratical is most useful. I have read the Virtual Machine Implementation book and found that it is quite old and doesn't represent the vms I…
Gavin