Talk:IronRuby

From Wikipedia, the free encyclopedia

This article is part of the .NET WikiProject, an attempt to improve and organize the .NET content on Wikipedia. If you would like to participate, you can edit the article attached to this page, or visit the project page, where you can join the project and/or contribute to the discussion.
Start This article has been rated as start-Class on the quality scale.
Mid This article has been rated as mid-importance on the importance scale.

It is a little bit unclear whether IronRuby is a compiler that generates .NET code (Ruby->.NET) or just a Ruby interpreter which runs on the .NET platform and not directly on hardware.

IronRuby is a compiler, which operates in two modes. One is directly compiling directly to .net assemblies containing .net IL like C# and VB.NET compilers do. The .net assemblies are then just-in-time compiled (jitted) to machine code at the moment of execution. The other mode is immediate or interactive mode (which gives the illusion that it is being interpreted, but is actually being compiled). As soon as an expression is entered, it is compiled to a dynamic method containing IL which is jitted to machine code. The only difference between the two methods is that the on-disk assemblies are not created in interactive mode. The code translations (source -> IL and then IL -> native code) happen exactly once, which is the basic definition of a compiler. Same goes for IronPython and PowerShell, the running code is actually compiled, not interpreted. --soum talk 18:24, 26 July 2007 (UTC)