[Mono-list] C++ to CIL compilers?

Tyson Dowd trd@cs.mu.oz.au
Mon, 21 Jan 2002 09:10:19 +1100


On 20-Jan-2002, Felix Breuer <felix@fbreuer.de> wrote:
> Hello!
> 
> Are there any C++ to CIL compilers _except_ Visual C++? 

Even Visual C++ doesn't necessarily compile to CIL, although in practice
you can make it do so much of the time.  But there are plenty of
constructs in C++ that simply won't get turned into CIL at all -- if you
just take existing C++ code and run it through the compiler, you'll get
very little CIL (if any!).

What Visual C++ .NET provides is "Managed Extensions to C++" which allow
you to interface to CIL quite well, while still allowing you to use all
of C++.  Much of the C++ will get compiled into native code, but if you
are careful and use __gc attributes and so on you can make quite a bit
of it compile into CIL.  But this should be distinguished from
programming in C++ -- you are programming mostly in a subset of C++ and
using some extensions to the language.

> The idea of making component programming and reuse language independent
> is IMO the best thing about .NET/Mono. But I hardly found any compiler
> apart from MS's development suites targeting the CIL. As only a C#
> compiler is planed as part of the Mono Project and as the GCC Project
> does apparently not plan to add a CIL backend, do I have to invest a
> substantial sum of money (that I don't have) in a set MS compilers to
> start using Mono (using a language other than C#)?

There are many other languages other than C# and C++ that have compilers
that target CIL.  Even Microsoft advertises them in their press releases
and web pages, so it's kind of strange that you didn't find them.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd@cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #