Search code examples
compiler-constructioninterpreter

Do any languages have neither an interpreter nor a compiler?


Note:I don't mean some theoretical question which don't have any implementation just languages that don't have both!!!!!


These days there exists a c/c++ interpreter(cint) and a python compiler(to python bytecode).

I understand that the simplest definition is that a compiler just converts code from language a to language b, and then you have a machine which runs b it together with input, while an interpreter is simply something that takes input plus code in language a and runs it. And that using these definitions if something has an interpreter or compiler its fairly simple to get the other by immediately running the output of the compiler or embedding the compiler w/ the source code to get an interpreter.

So ignoring those which languages don't have both a compiler (which compile source code in A to B preferably an intermediate language) and an interpreter that run large chunks of code without compiling them?


Solution

  •   Compiler vs. Interpreter
    

    An interpreter translates some form of source code into a target representation that it can immediately execute and evaluate. The structure of the interpreter is similar to that of a compiler, but the amount of time it takes to produce the executable representation will vary as will the amount of optimization. The following diagram shows one representation of the differences. graphic Compiler characteristics:

    * spends a lot of time analyzing and processing the program
    * the resulting executable is some form of machine- specific binary code
    * the computer hardware interprets (executes) the resulting code
    * program execution is fast
    

    Interpreter characteristics:

    * relatively little time is spent analyzing and processing the program
    * the resulting code is some sort of intermediate code
    * the resulting code is interpreted by another program
    * program execution is relatively slow
    

    alt text
    (source: gpollice at web.cs.wpi.edu)