Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any scenario where programmer use IL as their primary language for writing code

Tags:

.net

il

Most of the developer use one of the core .NET language ( Like c#, vb.net, c++/cli etc) to create their applications/developers. I was just wondering if any one would use Intermediate Language (IL) as their primary language for their day to day job as programmer.

like image 319
palm snow Avatar asked Dec 06 '25 02:12

palm snow


2 Answers

I can't imagine a situation where you would need to. Assuming the .NET compilers are decent, it would be wise (and more efficient in terms of time spent coding) to leave IL-level optimizations to the compiler, rather than trusting yourself to do them.

In the time required to write some code in IL, you could do 10x the work in C# in the same time, and the .NET compiler would likely do a better job than we would of optimizing it too.

like image 93
Karl Nicoll Avatar answered Dec 09 '25 05:12

Karl Nicoll


No, there is no reason for programming in IL unless you are forced to.

IL is not invented as a programming language. It is (as the name implies) an Intermediate Language -- one that is generated as output from a high-level language and then later compiled into machine code, typically in runtime by a JIT-compiler.

like image 36
Mårten Wikström Avatar answered Dec 09 '25 05:12

Mårten Wikström