Why compile to intermediate code?

Why ActionScript, Java, C #, etc. compiled into intermediate code? I know about the cross-platform benefits of using middleware.

The question arises: what is the advantage of compiling intermediate code over scripts (JS, Python, PHP, Perl, etc.) that are interpreted?

Is it easy to obfuscate code? Or what?

Also, what is the advantage over compiling to native code?

+5
source share
6 answers

java /, JVM , JIT. java .

, " " /IL - JVM/JIT. VM + JIT . , Java, JRuby, JPython, Groovy .. JVM, #, VB #, ASP.NET, F # .. - .NET /VM .

+6

JIT- IL-, , Java # ( ).

, . (, LINQBridge)

+12

, . () , .. .

+1

.NET MSIL , #, VB.NET ..

+1

, , .

, z = a + b - (c * d) , , , . , 8 !

- -, .

+1

SLaks, IL , .

. Scala 2003 , . Ruby, , Rails- 1,5 . , , , Scala - Java- , : , t , - (, , ), Scala. F # , .

Ruby, meanwhile, doesn’t speak well with code from other languages, so his community should put a lot more effort into developing Ruby-specific libraries and frameworks, and its potential users should be much more willing to make a massive platform shift to use it.

+1
source

All Articles