MichelBertrand
Junior Member
- Sep 16, 2015
- 123
- 54
I write software for microcontrollers in C. I want to do object-oriented programming. Choose between 3 variants: C ++, C # and Java. In which language would be easier to just go?
I write software for microcontrollers in C. I want to do object-oriented programming. Choose between 3 variants: C ++, C # and Java. In which language would be easier to just go?
Explain please, that means more control? In C # will not be any procedures / functions are available in C ++?
I would recommend using Java for a few reasons. The language was built with Objective Oriented Programming in mind, and performs better when OOP is used properly. Java runs in it's own Virtual Machine which is great, because you can tweak the JIT compiler to get even more efficient processing speeds than possible with C++. Java (As well as C#) is also very lenient with "lazy programming" because it allows you to not worry about objects as usually they fall out of scope rather quickly and are collected by the GC (Garbage collector). Java and C# both have their own memory management tactics that help you not have to worry about manually freeing memory.
Java is the king of the hill, with Android taking up roughly 64% of the mobile market and the native code for all applications on android is written in Java. In comparison, C# and C++ are not the native languages for any mobile devices (that I'm aware of / have substantial market share in the mobile industry) as Apple/iOS uses C. (Note: Not C++).
Also with Java constantly getting updates and it's easy to understand collection and networking interfaces, combined with it's lovely implementations of asynchronous tasks allows you to just create a very smooth program without much hassle. Java is also cross-platform and runs natively on Windows, Linux, and Macintosh devices. C# on the other hand is only multi-platform when used in combination with the mono project, which is a 3rd party implementation of C# and not directly supported by Microsoft. It's usually a major version or two behind.
Personally I started out as a Java developer. I've been programming in Java for almost ten years, but I've also used C#, C++, Ruby, Python, JavaScript, Perl, and Lua. Take my advice when I say that Java is the best choice. There's a lot of things you can do in Java that you can't do in C# without over-complicated implementations. Hell, just look at Java's super sexy enum implementation versus C# which is basically just an integer array with named indexes. C++ is also a great language, and will probably be the easiest for you considering you work with C, but Java is definitely a step in the correct direction.
On a side-note, these languages are falling off fast and if you want to take up a prototypical language (JavaScript) you can write in an Object Oriented manner. The language is not Object Oriented, but with HTML5 becoming the future and Hybrid mobile applications becoming more and more popular, you can't go wrong with it.
As you can see Java is currently the most popular language as far as employment goes. Javascript isn't far behind it, and like I said in my previous post, I expect it to be walking on Java by 2018. C# doesn't really have many things going for it, other than it's a "Microsoft" language. Ironically, C# is Microsofts attempt at Java.
C# doesn't really have many things going for it
By 2018, you'll be on Java. And now what you write?
By 2018, you'll be on Java. And now what you write?