0

Even among CS students you can hear "omg my Python script doesn't compile". It hurts my ears as it is an interpreted language. What is an equivalent for "doesn't compile" for interpreted languages? "Doesn't interpret"?

greenbanzai
  • 79
  • 2
  • 7
  • 1
    "Doesn't parse"? – tripleee Jun 07 '21 at 09:50
  • it all depends on the actual error, it could be "it doesn't load", or "I see a backtrace when running a program", etc. but students should be encouraged to be precise and say what is actually happening. For example "it doesn't compile" is probably true but not useful to start diagnosing what is wrong. And the program by itself does nothing, it is the compiler who does things. "The interpreter says this import is not found" is a a precise problem, for example. "The compiler says there is a missing semi-colon there" too. – coredump Jun 07 '21 at 09:51
  • "Doesn't work". Or more specifically, "Emits the following error message: ..." – khelwood Jun 07 '21 at 09:54
  • 1
    In Python it's a `SyntaxError`. *Doesn't compile* is a way of saying that the code is invalid in a way that the compiler can't tell what object code it should produce. When the Python compiler says `SyntaxError` it is saying that the code is invalid in a way that it can't tell what abstract syntax tree to produce. The parallel is not exact, of course. Many compiled languages will complain if you try to multiply a float by a string, but in a dynamic language like Python that is a run-time error because the types of the operands can't be determined in advance. – BoarGules Jun 07 '21 at 10:09
  • Python does compile, into a bytecode. Errors may happen in that phase. – SK-logic Jun 10 '21 at 18:53

0 Answers0