Why Bytecode?
Eric W. Biederman
ebiederm+eric@npwt.net
06 Feb 1998 17:42:42 -0600
>>>>> "MY" == Maneesh Yadav <97yadavm@scar.utoronto.ca> writes:
MY> OK, this may be a stupid comment, but I can't figure out a good answer.
MY> Why is that VM's like java impliment their thing with a universal
MY> bytecode?
Efficiency, and portability. A byte code is a no brainer to
interpret, just do a switch on the byte code, and go to the right
place to interpret that.
Also basic optimizations can be done ahead of time.
Besides I haven't seen a `universal' bytecode.
MY> Why not concentrate on a VM with a readable language with a JIT and save
MY> space by leaving it up to a compression algo.?
MY> In order to prevent the code stealing, mangled sources could be used...
Code's copyrighted so why do you need to worry about code stealing?
MY> I realize that a bytecode is good since it resembles a processers
MY> instruction set nad is small. But why restrict a language to only work
MY> with today's processing paradigms (who knows what's next). Surely a
MY> good HLL leaves more room for the future.
It's expedient, simple, and well tested. When that future comes you
upgrade your virtual machine.
MY> Doesn't bytcode just put an unessecary step in between
MY> idea-> language->program?
No. It just specifies the form.
Eric