For mobile apps, I know that they can be written in Java for Android and in Objective C for iPhone. Someone briefly mentioned to me that it is actually better to use one universal language for the app across different phones with the language C#. He implied that one language is always better for an application on both Android and iPhone, but I know this sounds too good to be true.
What is the difference between using 2 different languages (java / objective c) for an application on two different types of phone versus one language (c#) for the application that works on both phones?
What are the pros and cons of both?
Each platform has their official language and SDK to develop native applications. It is the supported language and SDK, so if you use this native language you will get all features, will be up-to-date and your application will run fastest (unless you wrote crap code, but that’s something developers never do, so we can safely exclude this hypothesis).
There are some frameworks (such as Xamarin) which allow you to write applications with the same language and run it on multiple platforms. The pros is obvious => same code that runs everywhere. The cons is that those frameworks usually don’t support some of the unique features of the specific platform because those features don’t exist on other platforms. Also since there’s an automated translation between C# and the target native language of the platform, during this translation there might be some issues.