3 ms·
One cool thing about C# (and the .NET platform in general) is the ability to translate your code into another programming language (aside from some possibly inc
by profquail 17y ago
One cool thing about C# (and the .NET platform in general) is the ability to translate your code into another programming language (aside from some possibly incompatible differences in programming languages). So there's really not much stopping anyone from writing a C# to Java converter that would handle a decent chunk of the porting (so you wouldn't lose any software), and then you could just fix up the minor stuff yourself.
For an example, check out the .NET reflector. By default, it lets you convert between C#, VB.NET, (Managed) C++, and CIL. You can also get plugins for IronPython and so forth.
http://www.red-gate.com/products/reflector/ http://www.red-gate.com/products/reflector/ (it's free)
- scscsc 17y agoThe ability to translate between two programming languages is called a compiler. There is theoretically nothing stopping anyone from writing a anything-to-anything "converter" (you mean compiler).
- stevecooperorg 17y agoNo, the right word is translator. A compiler generally creates a form optimised for execution, like machine code or bytecodes. A translator creates source code files from other source code files. The program the poster was referring to is actually a disassembler, taking Microsoft IL (assembly for the virtual machine) and converting it to a .Net language. So you might; - compile C# to Microsoft IL - decompile the IL back to IronPython - use that as the basis of a CPython version.
- scscsc 17y agoI do not want to enter a dispute concerning naming, but I'll just point out that many consider a compiler to be anything that you might call translator. What would you call a program that transforms C code in assembler code? Isn't assembler code source code?