Linked Questions

131
votes
27answers
27k views

Is source code generation an anti-pattern?

If something can be generated, then that thing is data, not code. Given that, isn't this whole idea of source code generation a misunderstanding? That is, if there is a code generator for something, ...
60
votes
14answers
13k views

Can we make general statements about the performance of interpreted code vs compiled code?

I'm comparing two technologies in order to reach a recommendation for which one should be used by a company. Technology A's code is interpreted while technology B's code is compiled to machine code. ...
44
votes
6answers
11k views

Does an interpreter produce machine code?

I study the topics of compilers and interpreters intensively. I want to check if my base understanding is right, so let's assume the following: I have a language called "Foobish" and its keywords are ...
14
votes
5answers
2k views

Can every language be categorized as either compiled or interpreted? [duplicate]

As per Wikipedia: A compiled language is a programming language whose implementations are typically compilers (translators that generate machine code from source code). And an interpreted language is ...
19
votes
4answers
17k views

How does Chrome V8 work? And why was JavaScript not JIT-Compiled in the first place?

I have been researching Interpreters/Compilers, then I stumbled across JIT-Compilation - specifically Google Chrome's V8 Javascript Engine. My questions are - How can it be faster than standard ...
10
votes
3answers
7k views

Why does Python need both a compiler and an interpreter?

I can understand the fact that Java needs both a compiler and an interpreter. It compiles source code to bytecode and then a virtual machine (on Windows, on Linux, on Android, etc.) translates that ...
5
votes
1answer
5k views

Why are most functional programming languages also interpreted languages? [closed]

Functional/non-functional and interpreted/compiled are two different categorizations, yet it seems that there are a lot of overlaps in the programming languages that fall under those categories. Is ...
7
votes
2answers
4k views

How are scripting languages compiled?

I know the term "scripting languages" is just a subset of programming languages, but I want to refer to programming languages such as Python and Ruby among others. First of all, why don't we need a ...
3
votes
3answers
1k views

How does a compiler work when it's not directly compiling to machine code

I know the compilation process goes with this flow: source -> parse -> AST -> intermediate code -> assembly -> machine code and in the case of Java you will have bytecode which is ...
2
votes
4answers
322 views

Ahead-of-time compilation to native machine code of dynamically typed languages

It is my understanding that: It's particularly difficult to compile ahead of time, to efficient native machine code, a dynamically typed language like Python. Largely as a result of the above, the ...
1
vote
3answers
315 views

Is it really correct to talk about compiled and interpreted languages? [duplicate]

It is pretty obvious that any interpreted language CAN also be compiled. For a long time I thought that it was not necessarily the other way around. Then I discovered Ch which is an interpreter that ...
-3
votes
3answers
88 views

is python(cpython) code represented as c code by the interpreter?

what i know is , in cpython when we run a code then its first compiled into byte code and the cpython interpreter( which is written in c interprets it) interprets the byte code and converts it into ...