1
I would like a purchase of a language that uses virtual machine and one that does not use.
1
I would like a purchase of a language that uses virtual machine and one that does not use.
5
I will respond with application VM bias and ignore other types.
Virtual machine is a simulation of a real machine through software. Therefore a software is created that will run on the real machine (technically it could run on top of another virtual machine, but it makes little sense) as a normal application, and its function is to reproduce the characteristics of a real machine to run a code from another application. In some cases it’s just an intermediate step.
The virtual machine usually has a own assembly language as a processor has, and its applications are ultimately written in this language, but of course the source of the code may be in other languages. Usually the source code is compiled for this assembly before or during execution.
Some machines interpret this assembly and run in a loop deciding what to run in a huge switch
with each instruction. Others use one Jitter which transform this assembly into the assembly of the physical processor it is running on (which will become machine code) or even direct machine code from it, the most common.
It is possible in some cases to have a virtual machine that takes place an interpretation where all translation takes place as it goes running. Or you might even have some VM that doesn’t have this whole process and only serves for greater application access control, so it can use the processor’s own assembly. But they are very unusual implementations.
In general the advantages given can be obtained in native applications, just not in the same way, with slightly different commitments. In both cases you have to give up some things, but you can have ease, performance, security and ability to run multiple platforms.
There are also a number of specific advantages and disadvantages of some VM or need-to-know.
For the language itself little or nothing, unless its specification determines something specific about it, including having some requirement that requires it to be done only on a VM or that it is prohibited to use it.
Except as stated above, language implementations can be done either to run on a VM or not. Each will have its advantages and disadvantages as long as it meets the language specification.
In essence all languages called dynamics run on a VM. Its use is not mandatory, but if the dynamism is very important it is much easier that way. This goes for JS, PHP, Python, Ruby, Perl, Lua, Smalltalk, VB (classic) and various Basics, xbase languages, various LISP implementations, etc.
Browser other questions tagged characteristic-language virtual-machine
You are not signed in. Login or sign up in order to post.
To manieiro’s answer translates well what a virtual machine is. Nowadays, there is a lot of talk about containers, something worth you searching for. I usually summarize and VM in the following. If you need a laboratory to do some experiments, a VM is an excellent choice. Now for example, if Voce needs to use Windows and Linux on the same computer, using a VM for this purpose would not be interesting, for performance reasons. A dual boot in this second case would be more efficient.
– Kalman