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
1295
votes
12 answers

If Python is interpreted, what are .pyc files?

Python is an interpreted language. But why does my source directory contain .pyc files, which are identified by Windows as "Compiled Python Files"?
froadie
  • 79,995
  • 75
  • 166
  • 235
279
votes
15 answers

Is Python interpreted, or compiled, or both?

From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a…
Pankaj Upadhyay
  • 12,966
  • 24
  • 73
  • 104
184
votes
2 answers

Is Javascript compiled or an interpreted language?

Can Javascript be called a pure interpreted language? Or does it also have some compiled flavor to it? Could someone guide at the reasons behind both the things whichever being true.
netemp
  • 4,115
  • 12
  • 43
  • 63
90
votes
15 answers

Is C# partially interpreted or really compiled?

There is a lot of contradicting information about this. While some say C# is compiled (as it is compiled into IL and then to native code when run), others say it's interpreted as it needs .NET. EN Wiki says: Many interpreted languages are first…
John V
  • 4,855
  • 15
  • 39
  • 63
83
votes
4 answers

How to run a Haskell file in interpreted mode

I've been told you can interpret Haskell files (which I assume means they will work like Ruby/Python/Perl). I can't find the command line option on GHC to do this, though. It always wants to compile my file. Took a look at GHCi as well, but it…
Joshua Cheek
  • 30,436
  • 16
  • 74
  • 83
76
votes
11 answers

Do comments slow down an interpreted language?

I am asking this because I use Python, but it could apply to other interpreted languages as well (Ruby, PHP, JavaScript). Am I slowing down the interpreter whenever I leave a comment in my code? According to my limited understanding of an…
Mantas Vidutis
  • 16,376
  • 20
  • 76
  • 92
48
votes
15 answers

Why are Interpreted Languages Slow?

I was reading about the pros and cons of interpreted languages, and one of the most common cons is the slowness, but why are programs in interpreted languages slow?
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
46
votes
9 answers

Why interpreted langs are mostly ducktyped while compiled have strong typing?

I just don't know that, is there any technical reason for that? Is it more difficult to implement a compiler for a language with weak typing? What is it?
43
votes
9 answers

Why HTML/JavaScript/CSS are not compiled languages and will they ever be?

Why HTML/JavaScript/CSS are not becoming compiled languages (or maybe even merge into a single compiled language)? What if browsers were running "Browser Virtual Machine" and html/javascript/css sources could by compiled to a "browser bytecode".…
serg
  • 109,619
  • 77
  • 317
  • 330
42
votes
3 answers

Is Clojure compiled or interpreted?

I read somewhere Clojure is compiled. Is it really compiled, like Java or Scala, rather than interpreted, like Jython or JRuby?
OscarRyz
  • 196,001
  • 113
  • 385
  • 569
35
votes
15 answers

Why are so many web languages interpreted rather than compiled?

Why didn't languages such as C end up being using for web dev? Surely the speed increases from being compiled would be useful for heavy load sites?
Rich Bradshaw
  • 71,795
  • 44
  • 182
  • 241
31
votes
3 answers

Is Ruby a scripting language or an interpreted language?

I just noticed that in the wikipedia page of Ruby, this language is defined as interpreted language. I understood that probably there's something missing in my background. I have always known the difference between an interpreted language that…
28
votes
1 answer

How is setTimeout implemented in the javascript interpreters or timers in general?

How is a function called after a time has passed implemented in javascript or any other interpreted language? In other words, is there a loop behind in the javascript interpreter that checks all the time a list of timers, or is there any particular…
alvatar
  • 3,340
  • 6
  • 38
  • 50
28
votes
4 answers

Does python reuse repeated calculation results?

If I have an expression that I wish to evaluate in Python, such as the expression for r in the code snippet below, will the Python interpreter be smart and reuse the subresult x+y+z, or just evaluate it twice? I'd also be interested to know if the…
user189076
  • 439
  • 3
  • 7
28
votes
9 answers

Is Perl a compiled or an interpreted programming language?

Is Perl compiled or interpreted?
Mr. L
  • 3,098
  • 4
  • 26
  • 26
1
2 3
10 11