[Mono-list] On porting to C#

Tyson Dowd trd@cs.mu.OZ.AU
Tue, 10 Jul 2001 22:20:13 +1000


CodeDOM can be implemented in other languages too.
The fact that is spits out source code is no big deal -- it has to
compile the code somehow, and because CodeDOM allow snippets or verbatim
code to be inserted, running the compiler is a relatively easy way to 
achieve this.

There are implementations in several other languages around.
It helps enormously if your language is C# though.  And the closer you
are to C# the easier it is.

But I believe it is poorly designed.  The idea is a good one, but the
design is terrible.

On 09-Jul-2001, Casey Cady <casey@sarahandcasey.com> wrote:
> Substitute "badly designed" with "immature" and
> I'll completely agree with you. :)   I see potential in the
> CodeDOM namespace but currently it needs a big fat flashing
> red warning saying "I cheat!!!".
> 
> (For those that don't know about the CodeDOM namespace, it
> allows you to programatically represent source code.  You can then
> dump the CodeDOM to a source file, or compile it to MSIL.  The huge
> catch is that  Microsoft's implementation of the CodeDOM compiler
> simply spits out c# code and compiles it externally with the plain old
> compiler.)
> 
> Thanks
> Casey
> 
> On Monday, July 9, 2001, at 03:58 PM, Miguel de Icaza wrote:
> 
> >
> >> Besides,   it's probably much easier just to throw together a Java
> >> compiler that uses the CodeDOM and Reflection.Emit stuff as an MSIL
> >> puker than it is to write a Byte code converter, which, IMHO, misses 
> >> the
> >> point of the CLR.
> >
> > CodeDOM is sadly a badly designed piece of code.  It is not really
> > useful for a compiler, it is mostly a tool for creating C# source
> > code, but the tree later gets passed on to an external C# compiler.
> >
> > Reflection.Emit on the other hand is really nice
> >
> > Miguel.
> >
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

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