5

Aside from C#, VB.NET, C++ (Managed and C++/CLI), and F#, which .NET programming languages have their own CodeDom provider?

Nietzche-jou
  • 14,415
  • 4
  • 34
  • 45
plaureano
  • 3,139
  • 6
  • 30
  • 29

1 Answers1

3

I thought about making one for UnrealScript, but I run into odd issues like the fact that CodeBinaryOperatorType doesn't include an exclusive-or operation. The new expression trees in .NET 4 seem like a much better representation of what features the CodeDom should offer at a block level (as in a block of statements that makes up a function body).

I think we need a new CodeDom that takes the outer portions of System.CodeDom and uses the internals of System.Linq.Expressions. Then make the result able to produce either a dynamic assembly or source code as output. (Now that I think about it, producing a compiled assembly would actually be the same as creating a new "language" to output source to.)

Edit: On top of that, you also have to consider implementing the CodeModel API, since very often the CodeDom is implemented as someone is integrating a new language into Visual Studio.

Sam Harwell
  • 97,721
  • 20
  • 209
  • 280
  • 4
    During the last Lang.NET symposium one of the language creators complained about something similar and the Microsoft engineer responded (only half joking): "CodeDom can represent any language as long as it is C#." He basically admitted that CodeDom is a failure and that Expression Trees (or rather "Statement" Trees) are the way forward. – Jörg W Mittag Jan 18 '10 at 06:18
  • 1
    @JörgWMittag: Can Expression Trees be used to generate source code for a whole class? – O. R. Mapper Feb 06 '13 at 13:29