![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Yes, Java uses a VM, but why does anyone use Java? Mark Guzdial |
| Interpretation does not involve any translation at all! Consider me reading some instructions in French. My French is barely understandable on good days, but I could probably do the instructions. That's intepretation. But maybe I could rewrite the instructions in English first. Given that it's my mother tongue, I bet I'd execute those instructions much faster once they're in English. That's compilation Imagine that I had to repeat those instructions many times. Translating them once to English and then always executing the English would be faster than my trying to figure out the French each time. Does that help? Mark Guzdial |
| BTW, it's "Jython" not "Jythong." Mark Guzdial |
| Take a look in the book at the tiny graphics language interpreter. There's no VM there – the program just DOES what the input program says to do. Mark Guzdial |
| It doesn't really matter if the interpreter is written in machine language or not. When a program is interpreted, it's just executed. The question of compilation or not is whether a NEW program is created based on the INPUT program. A compiler writes out a new program, typically in machine language. An interpreter does not. Mark Guzdial |