d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Java Or C# ? > Translate Or Not ?
Add Reply New Topic New Poll
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Jul 30 2014 04:15pm
This may give me another answer had I posted in the java section.

I have been making small games in Java.

I am starting a project in unity. Seems like unity uses javascript, C# or Boo. Of those 3 I would like to use C#.

Is it possible to use some of my existing Java code or should i translate it.

If I have to translate my java code, does someone have experience with the various translators out there ?
Is it useful or does it only work with very simple code ?

Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Jul 30 2014 06:06pm
C# feels a lot like java. A lot of people call it C's version of Java. Translators? You mean something that will compile Java code to C#? You're better off just rewriting it.
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Jul 31 2014 08:17am
Quote (Minkomonster @ Jul 31 2014 01:06am)
C# feels a lot like java. A lot of people call it C's version of Java. Translators? You mean something that will compile Java code to C#? You're better off just rewriting it.


There are some source code translators. Like these. http://designzum.com/2014/03/27/best-tools-to-convert-java-to-c-source-code/

Maybe you are right. Just thought that it would help kickstart it if I saw some of my own code in C#.

:)
Member
Posts: 1,892
Joined: Dec 25 2011
Gold: 1.00
Jul 31 2014 08:42am
C#
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Jul 31 2014 05:13pm
Quote (tigeranden @ Jul 31 2014 09:17am)
There are some source code translators. Like these. http://designzum.com/2014/03/27/best-tools-to-convert-java-to-c-source-code/

Maybe you are right. Just thought that it would help kickstart it if I saw some of my own code in C#.

:)


I know there are source code translators. I never said they didn't exist. What do you think a compiler is? It takes a source language and translates it into an intermediary (usually machine code/byte code). Any language that has a Context-free grammar can compiled into another language with a context-free grammar through common compilation methods (lexical and syntactic analysis). Thus, if you look hard enough you will find someone who has created some translator (compiler) from one language into another. They just aren't very good. Clunky at times. Which is why I said you are better off just rewriting your Java into C#.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll