Technical Overview of the Common Language Runtime



This will be the last entry in blog, this post is focussed in giving my opinion about the article titled “Technical Overview of the Common Language Runtime" by Erik Meijer and Jim Miller, I am reading this article because I am developing a compiler as a project of the compiler design course that I am studying at ITESM and at this point I have already developed with my college partner the stages of lexical,syntatic (including AST construction) and semantic analysis and finally we are developing code in order to do the Code generation using the CLI (Common Language Infrastructure) because we are using C# and the Common Language Runtime (CLR) is present in this programming language, so, in order to understand better this virtual machine and its common language infraestructure and its differences between the JVM (Java Virtual Machine), our professor (Ariel Ortiz) recommended to us this article that it does  a comparison between JVM and CLI, I must say that it is a very interesting article and here are my opinions about it:

First of all, How is the process of the CLI? Well, in general terms, CLI is a platform-independent development system from Microsoft that enables programs written in different programming languages to run on different types of hardware. The CLI includes the Common Type System (CTS) and Common Language Specification (CLS). No matter which programming language they are written in, CLI applications are compiled into Intermediate Language (IL), which is further compiled into the target machine language by the Common Language Runtime (CLR) software.

Now, let's understand the Java Virtual Machine, in general terms, JVM is an environment that executes Java programs. The cycle consists that Java programs are compiled into an intermediate language called bytecode, then any program compiled into bytecode can be executed on any platform that has a JVM installed on it. Have you already notice the power of this? well, if you do not notice, this makes Java software compatible with many different computing platforms, so it is a very powerful feature!
In the end, these 2 technologies have very cool features, but if you read carefully the sentences that I put in bold, then you are going to notice the key difference of CLI: many programming languages. Let me explain this clear difference having in mind the information that I read in the article, first, JVM does not provide encoding type-unsafe this is: pointers and unsafe type conversions, also in the JVM all storage locations are 4 bytes wide, in the CLI are polymorphic, this means that the wide could be 4 bytes or hundreds of bytes (key difference!!!!), CLI has many features that are things that JVM does not have, I must say that it is a clear competitor and a clear solution to the JVM problems, because, as I said before, JVM  doesn't provide features according to the reading that gives a solution to encode type-unsafe features like pointers, tagged pointers, unsafe type conversions, function pointers, lxical closures, and more, I must say that CLI it is a complete solution for these kinds of problems, If you are interested in learning more about these features and the differences between the JVM, I also recommend you the article that my professor recommended to me: read the article here!




Comentarios

Entradas populares de este blog

Sif

Making Compiler Design Relevant for Students who will (Most Likely) Never Design a Compiler

Introduction