Re:Switching from C# to Java
by tzs on Tuesday April 13, 2010 @08:09AM
(#1261681)
It sounds like they rejected Grasshopper, the .NET to Java converter that works at the bytecode level, without doing a test to see if it would have worked, on the grounds that they wanted to be open source.
They probably should have given it a try, because if it had worked, it would have opened up a possibility that they seem to have completely overlooked. Use Grasshopper to convert at the bytecode level, then use a Java decompiler to go from bytecode to Java source.
You'd lose comments in the source code that way, but I bet it would not be hard to write a tool to transfer the function level comments from the C# source to the Java source. Subsequent hand editing to translate any C#-isms to Java-isms in the comments, and restore any crucial sub-function level comments, would probably have only taken a few days.
They probably should have given it a try, because if it had worked, it would have opened up a possibility that they seem to have completely overlooked. Use Grasshopper to convert at the bytecode level, then use a Java decompiler to go from bytecode to Java source.
You'd lose comments in the source code that way, but I bet it would not be hard to write a tool to transfer the function level comments from the C# source to the Java source. Subsequent hand editing to translate any C#-isms to Java-isms in the comments, and restore any crucial sub-function level comments, would probably have only taken a few days.