OCR Computer Science GCSE 关于编译器和解释器的错误?

Is the OCR Computer Science GCSE wrong about compilers and interpreters?

我是一名中学生,目前正在参加 OCR 计算机科学 GCSE (J276). I taught myself to program and was recently surprised by the context of a question in one of OCR's specimen papers (this one),因为这与我的编程知识相悖。

第5b题,继续一道题,要求描述编译器和解释器的区别:

Harry can use either a compiler or an interpreter to translate the code [that he has created].

这让我感到困惑,因为它似乎暗示编写的代码可以解释或编译以便 运行,这很奇怪,因为我的理解是语言适合两个框之一,解释(python,java脚本)或编译(c++,java),而不是两者都适用。

是否真的可以根据程序员的意愿编译或解释单一的编程语言,或者这是 OCR 简化课程使其更容易理解的另一种情况?

C是一种通常编译的语言,但是interpreted implementations exist.

根据@delnan 在this 的回答,

First off, interpreted/compiled is not a property of the language but a property of the implementation. For most languages, most if not all implementations fall in one category, so one might save a few words saying the language is interpreted/compiled too, but it's still an important distinction, both because it aids understanding and because there are quite a few languages with usable implementations of both kinds (mostly in the realm of functional languages, see Haskell and ML). In addition, there are C interpreters and projects that attempt to compile a subset of Python to C or C++ code (and subsequently to machine code).

实际上,您课程的设计者似乎说了一些理论上正确的事情,但在实践中往往受到更多限制。这在编程中随处可见,事实上,在整个世界中都存在。你能为 Commodore 64 写一个 JavaScript 编译器吗?当然,C64 实现了完整的通用计算机系统,JavaScript 是图灵完备的。仅仅因为某件事是可能的并不意味着很多人实际上它,或者它容易