Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bulk translation of C# to Objective C

Tags:

c#

objective-c

Our department has inherited two new code bases. One is in C#, the other is in Objective C. The first has a bunch of functionality that we need in the second as well.

I realize that there isn't going to be a 1-to-1 relationship that we can run a simple translator to move from C# to Objective C, but is there some tool to do a rough conversion of the syntax.

We're mostly looking for a tool that would do some of the mindless part. I'm not looking forward to manually translating 1000 function headers, for example, when the format for both is so well defined.

EDIT

Even something we could run on an individual methods one at a time would speed up the process significantly.

like image 615
Robert Gowland Avatar asked Oct 07 '11 13:10

Robert Gowland


People also ask

What is translation in C?

In C and C++ programming language terminology, a translation unit (or more casually a compilation unit) is the ultimate input to a C or C++ compiler from which an object file is generated.

How do you define a unit of translation?

In the field of translation, a translation unit is a segment of a text which the translator treats as a single cognitive unit for the purposes of establishing an equivalence. It may be a single word, a phrase, one or more sentences, or even a larger unit.

Is Google Translate accurate?

Yes, Google Translate is very accurate for the most part. In some cases, it's 94%+ accurate! In fact, it's one of the top-rated translation tools when it comes to translation accuracy, though the exact accuracy will depend on the language pairs that you've chosen.


1 Answers

Are you getting rid of the C# code base? If not then it seems like you can look at this from a different angle - rather than undertaking the huge effort of converting thousands of classes that rely on probably scores of API's, how about exposing your existing functionality as services that can be called from your Objective-C code? You can do this using web services.

Alternatively you can take a look at Mono/Cocoa#, though I doubt this is going to be a viable solution for your problem.

like image 182
Perception Avatar answered Oct 08 '22 14:10

Perception