1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help to choose the right path

Discussion in 'C, C++, C#' started by MichelBertrand, Sep 27, 2015.

Tags:
  1. MichelBertrand

    MichelBertrand Registered Member

    Joined:
    Sep 16, 2015
    Messages:
    80
    Likes Received:
    20
    Occupation:
    Beach boy
    Location:
    EU
    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?
     
  2. acidol2

    acidol2 Supreme Member

    Joined:
    Sep 8, 2011
    Messages:
    1,322
    Likes Received:
    835
    Location:
    My Successful Future
    I think most people who start learning OOP programming start out with C#, thats just my opinion though.
    So you could start there and see how it goes.
     
    • Thanks Thanks x 1
  3. ekapek

    ekapek Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 2, 2010
    Messages:
    273
    Likes Received:
    48
    Home Page:
    My vote for C# too, but with a knowledge of C you can learn C++ quite fast
     
    • Thanks Thanks x 1
  4. Leroyxxx

    Leroyxxx Junior Member

    Joined:
    Nov 28, 2012
    Messages:
    109
    Likes Received:
    37
    In my opinion C# is the easiest, Java is a bit harder and C++ is pretty hard.

    Every language has strong and weak points. For example C# has many cool features, but in C++ you have much more control.
     
    • Thanks Thanks x 1
  5. MichelBertrand

    MichelBertrand Registered Member

    Joined:
    Sep 16, 2015
    Messages:
    80
    Likes Received:
    20
    Occupation:
    Beach boy
    Location:
    EU
    Explain please, that means more control? In C # will not be any procedures / functions are available in C ++?
     
  6. DigitalPigeon

    DigitalPigeon Newbie

    Joined:
    Sep 30, 2015
    Messages:
    16
    Likes Received:
    2
    C++ would be the easiest choice since you already know C. But I would recommend Java because it was designed with OOP in mind whereas C++ was just an add-on to ansi-c. In Java you can't help but use OOP, but in C++ you can get away with many C-like tendencies.
     
    • Thanks Thanks x 1
  7. AdrianoRamazzotti

    AdrianoRamazzotti Newbie

    Joined:
    Oct 6, 2015
    Messages:
    20
    Likes Received:
    4
    Chose a Java, its crossplatform. You will to programm and Windows, and Linux, and IOS, and Android.
     
    • Thanks Thanks x 1
  8. AppCentral

    AppCentral Newbie

    Joined:
    Oct 7, 2015
    Messages:
    32
    Likes Received:
    8
    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.
     
    • Thanks Thanks x 2
  9. Leroyxxx

    Leroyxxx Junior Member

    Joined:
    Nov 28, 2012
    Messages:
    109
    Likes Received:
    37
    C++ has some libraries/things that C# don't have and C# has some libraries/things that C++ don't have. What I rather meant is that in C++ you need to do things yourself that are taken care of in C#. It has its pros and cons. You don't need to do much in C#, but you don't have such flexibility than C++ has.


    For example in .NET there is build-in Garbage Collector, but in C++ you need to release resources yourself to avoid memory leak. Another example are .NET libraries that make alot of things easier.
     
    • Thanks Thanks x 1
  10. TeamSocial

    TeamSocial Junior Member

    Joined:
    Jun 15, 2014
    Messages:
    130
    Likes Received:
    41
    Gender:
    Male
    I don't agree with all of this but I think the end is extremely good advice.

    I love c++ personally, I use a (frowned upon) mixture of c and c++ consistently. But I must say Over the last couple years all my projects bring me closer to php client and server side. You don't need to know html per say, but just be able to understand it. Javascript is used everywhere and it bothers the shit out of me I'm not better with it. I'm struggling in a project right now because my absence of knowledge in it so I'll probably be picking up on it a little over the next few days.
     
    • Thanks Thanks x 2
  11. kahuna74

    kahuna74 Regular Member

    Joined:
    Aug 19, 2014
    Messages:
    270
    Likes Received:
    102
    Gender:
    Male
    Occupation:
    Software Developer
    Location:
    Grand Rapids, MI
    How about a functional language? I'm a huge fan of clojure, since it runs on the JVM and also allows you to call out to Java when you absolutely need to (which is rarely, to be honest). There's also a dialect that compiles down to Javascript which you can use for front end dev. Basically it's awesome.

    Some other functional languages that I've tried and enjoyed are elixr, scala, and haskell (but haskell is tough, I'm not productive enough in it).

    There's more to life than procedural, imperative, and object oriented programming.
     
    • Thanks Thanks x 1
  12. AppCentral

    AppCentral Newbie

    Joined:
    Oct 7, 2015
    Messages:
    32
    Likes Received:
    8
    (Before I start, this entire reply is not addressed to you, mainly just the first paragraph).

    Most people are concerned more with what the industry is looking for, and what can be applied to more situations. Clojure runs on the JVM and so does Groovy. Clojure is a little bit of a different situation here, because it can run on numerous engines where-as Groovy only runs on the JVM. What it comes down to though is it's just a dialect-scripting/line-interpreter way of writing in Java without actually writing in Java (Which just gives you less control). I'm not going to go into elixir, scala, or haskell because I don't know enough about them and I'd just be running my mouth.

    As far as the industry goes none of the languages that you've suggested hold any considerable amount of job-share for the field. I'm sure you can find one if you look hard enough, willing to relocate, or work for yourself, but it's just not realistic for some people.

    Programming Language Market Share Average Salary
    Java 18% $100,00 USD
    JavaScript 17% $90,00 USD
    C# 16% $85,00 USD
    C 9% $90,00 USD
    C++ 9% $95,00 USD
    PHP 7% $75,00 USD
    Python 5.5% $100,00 USD
    R 3% $95,00 USD
    Scheme 3% $65,00 USD
    Perl 3% $100,00 USD
    Miscellaneous Languages 9.5% Varies.

    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.
     
    • Thanks Thanks x 1
  13. AdrianoRamazzotti

    AdrianoRamazzotti Newbie

    Joined:
    Oct 6, 2015
    Messages:
    20
    Likes Received:
    4
    I.e. advise you immediately learn JAVA? Can you recommend the literature, how to start?
     
  14. Leroyxxx

    Leroyxxx Junior Member

    Joined:
    Nov 28, 2012
    Messages:
    109
    Likes Received:
    37
    It is important to say that Java is so popular partly because of Android. Also, it's older language, so it had more time to establish its position. Saying that

    isn't either true or false, it's just subjective.
     
  15. MichelBertrand

    MichelBertrand Registered Member

    Joined:
    Sep 16, 2015
    Messages:
    80
    Likes Received:
    20
    Occupation:
    Beach boy
    Location:
    EU
    By 2018, you'll be on Java. And now what you write?
     
  16. Leroyxxx

    Leroyxxx Junior Member

    Joined:
    Nov 28, 2012
    Messages:
    109
    Likes Received:
    37
    It is directed to me? If so, I write in C# now. Writing that by 2018 I'll by on Java is quite bold thing to say. Why do you think so?
     
  17. kahuna74

    kahuna74 Regular Member

    Joined:
    Aug 19, 2014
    Messages:
    270
    Likes Received:
    102
    Gender:
    Male
    Occupation:
    Software Developer
    Location:
    Grand Rapids, MI
    So it looks like Java is in the lead. Which is good! It's the gold standard of OOP languages (although it's OOP features leave a lot to be desired, IMO). I think that cross platform wins out over C#, although there's Mono, which runs on *nix as well.

    OP, my advice would be to expand your skillset. Look up seven languages in seven weeks. A good coder steeps themselves in many different types of languages and can apply what they learn to their favorite language.
     
    • Thanks Thanks x 1
  18. AppCentral

    AppCentral Newbie

    Joined:
    Oct 7, 2015
    Messages:
    32
    Likes Received:
    8
    I'm going to assume this was directed at my post where I said I assumed that by 2018 JavaScript would be walking on Java. They are two different languages and shouldn't be confused. JavaScript is a prototypical language used for many client-side applications. (Commonly found on websites). It's also being used for server-side applications more and more with the establishment of NodeJS.

    Java is an Object Oriented Programming language, created originally by Sun Microsystems. I don't believe that Java is going anywhere anytime soon, simply because android uses it for it's core. A lot of other hardware uses it too, for example blue-ray players, refrigerators, smart-tvs, etc.

    I currently write in JavaScript and I haven't touched Java in a few months. There's strengths and weaknesses to both languages, it just depends mainly on what you want to do.
     
    • Thanks Thanks x 1