Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# vs. C++ in a cross-platform project

My team is planning to develop an application that is initially targeted for Windows but will eventually be deployed cross-platform (Mac, Linux and potentially embedded devices). Our decision is whether to use C#/.NET or generic C++ (with Qt as the user interface library). We’re projecting that by using C#, we can develop our product faster and at a lower cost due to the increase of productivity over C++, but we’re taking a gamble on whether cross-platform implementations of C# will be mature enough at the time when we want to roll out to other platforms.

Any suggestions from any of you who have been in a similar situation?

like image 208
Tony the Pony Avatar asked Aug 10 '09 16:08

Tony the Pony


People also ask

Bahasa C digunakan untuk apa?

Meskipun C dibuat untuk memprogram sistem dan jaringan komputer namun bahasa ini juga sering digunakan dalam mengembangkan software aplikasi. C juga banyak dipakai oleh berbagai jenis platform sistem operasi dan arsitektur komputer, bahkan terdapat beberepa compiler yang sangat populer telah tersedia.

C dalam Latin berapa?

C adalah huruf ketiga dalam alfabet Latin. Dalam bahasa Indonesia, huruf ini disebut ce (dibaca [tʃe]).

Bahasa C dibuat pertama kali oleh siapa dan tahun berapa?

Bahasa pemrograman C ini dikembangkan antara tahun 1969 – 1972 oleh Dennis Ritchie. Yang kemudian dipakai untuk menulis ulang sistem operasi UNIX. Selain untuk mengembangkan UNIX, bahasa C juga dirilis sebagai bahasa pemrograman umum.


2 Answers

Despite all the potential cross platform capabilities of Mono, today, C++/Qt is simply a much more mature option than either C#/WinForms or C#/Gtk# for cross-platform purposes. Any productivity gains you would get by using a higher-level language would likely be offset by dealing with limitations of Mono.

like image 157
Pavel Minaev Avatar answered Oct 05 '22 18:10

Pavel Minaev


Jen, I'm worried about the wording of your question.

"My team is planning to develop an application that is initially targeted for Windows but will eventually be deployed cross-platform (Mac, Linux and potentially embedded devices)."

Is the plan to do cross-platform or not? I can infer that code will be initially written for Windows and then, maybe sometime later, effort will be expended in modifying the project for cross-platform capability. This will not be good for your health or your team's health! A definite business decision needs to be made here. One of the golden rules of cross-platform development is to treat all targeted platforms with absolute equality.

Can you use C# for embedded environments? Has it already been done commercially? Just curious.

"We’re projecting that by using C#, we can develop our product faster and at a lower cost due to the increase of productivity over C++" What do you mean 'projecting'? On what facts and figures are you making this projection? Do not forget that the coding effort on some projects is low as ~20% of the total effort required to bring a product to market. So the question of productivity comparison of computer languages may be not that significant. In my experience it's not productive to choose a computer language on the so-called productivity criteria.

"we’re taking a gamble" I agree with that, and gambling seems to contradict the meaning of planning. The question is: what are the risks?

Have you considered internationalisation?

Yes, I'm being critical but someone who is paying the money for this project may well be more questioning.

Book: Cross-Platform Development in C++: Building MAC OS X, Linux, and Windows Applications by Syd Logan - ISBN 032124642X Gives an idea of the issues involved.

I've been on a cross-platform and internationalised projects for Windows, Mac, and Linux using C++/Qt. The latter does well for both issues. One dis-like I have of Qt is it is not modern C++ in idiom nor does it encourage the use of modern C++ idioms. Just like MFC.

like image 23
Sam Avatar answered Oct 05 '22 19:10

Sam