3 ms·
Interpretation of some kind (including compiling to bytecode and interpreting/JITing that) offers a chance that the code can be verified for safety/"correctness
by pmjordan 18y ago
Interpretation of some kind (including compiling to bytecode and interpreting/JITing that) offers a chance that the code can be verified for safety/"correctness", something that's practically impossible for compiled native code for real, mainstream instruction sets. That's not to say it's actually impossible: just currently infeasible.
Other than that, I can't think of much else: as others have said, it's no longer a discrete choice, it's become a continuum of choices with hybrid solutions that come very close to the ideals of both extremes. Except for that of the simplicity of an interpreter maybe. :)
Reflection is useful whenever you need any kind of dynamic features in your system. Even for rigidly static languages, compile-time reflection can be useful ("metaprogramming"), although there's a serious danger of constructing cathedrals. As it has been said before, compiled code doesn't exclude reflection. Reflection is just metadata that gets compiled in, plus a mechanism for accessing it.
- johnm 18y agoRe: verification Your comment is only arguably true for completely statically compiled languages which have very weak (or no) processing model that can be enforced (by e.g., the loaders).