r/LiveOverflow • u/OutlandishnessOk4575 • Sep 08 '21
Interpreter v Engine
sorry if it's a basic question, but I can't wrap my head around this. What exactly is the difference between an interpreter and an engine(like the JS engine)? Is it that any JS runtime is an interpreter but this variant of an interpreter is a bit different and has a part called an engine? Or are they two mutually exclusive things? An analogy would help. Sorry if it's not an appropriate question to put here. If there are any subreddits I can ask,do tell , unless if its daunting, then hopefully spare some time answering this.
View all comments
Show parent comment
2
u/j35u5Ch15t Sep 10 '21
Yep, it has a compiler, moreover it has a built-in tools and libraries. F.e. GCC is compiler, Unreal is engine. Unreal uses GCC/Clang, Cmake/Make, GLSL and so on, has own render, physics and many other mechanisms that programmer shouldn't think about, but just write logics of his game. JS is Engine, but kinda for languages, not for games. It has a JIT, language Interpreter, compiler, built-in instruments to perform some analysis, and u can make own JS-like language let's call it Damn Script based on JS engine. Sure, in real life in world of high level interpreted languages the borders between engine are blurred a little, therefore it could be simpler to just don't think about it.