Question Locked

Compile time and runtime

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is Vb project gets interpreted first and then compiled and VB.net compiled first and then interpreted?If yes,then please give me the advantages and disadvantages?

2 replies

by tony hopkinson

Traditional compiled source procudes ans executable (.exe or dll).

The advantage is it's quicker and it can be optimised for whatever platform it's gojng to run on.

Interpreted is slower, because each piece of code has to be 'compiled' each time. But unlike precompiled code it's not set in stone. There fore waht ever is interpreting the code and running has far more opportunities for intervention. It also introduces a fair bit of independence from the environment. The code is basicall a etx file, where as the same code compiled is highly specific to the target platform.

Java with the JVM and .NET with it's framework, try for a halfway house.
The source we write is compiled into IL in .net, (byte code in java).
The high level languages we use are very 'english' in their semantics, where as these intermediate files are designed to be intrepreted very quickly. For instance variable name are replaced with menory locations, constants are pasted in where used...
So you get some of the benefits of each.

.NET's IL is also designed to be independant of teh language it's compiled from.
So you write code in VB.NET, compile it and the de-compile it in F#, or C#, or any other language they care to add.
Equally you can write your applications in severalm different languages (some are better at some things than others), and the Framework will not care.

HtHs

This discussion is closed to new replies.