Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

What makes C# so appealing?

Discussion in 'General Discussion' started by Mr-GamingWatch, Mar 15, 2015.

Thread Status:
Not open for further replies.
  1. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,822
    I see. :( That time you were serious. Except that you weren't. I think this is a paradox. Someone get CERN on the line!

    Now you're serious.
     
    Tomnnn and knr_ like this.
  2. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    What else could I add to the wonderful posts above? I knew C++ quite well, and yet, I started Unity with Javascript. After 4 months of struggling with plugins, callbacks, and syntax, I'd had enough. So, my next Unity project was in C#. I never looked back.

    Gigi
     
    Joviex, Ryiah and Meltdown like this.
  3. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Would you prefer c++ in unity if it ever becomes an option?

    The statement is true. Dealing with strings is fun and interesting, so I always make my own solution. But it still came out so silly D:

    I think this issue may be beyond science. It can't be some kind of biochemical weapon either, because you're all reading this on a computer screen. Clearly the only explanation left is magic.

    --edit

    Really? Nobody said it yet? Ok, I guess I'll do it...

    What is so appealing about C#? Well just look at it! It has a hashtag right in its name! Nothing appeals to people these days more than social media.

    JS is not as appealing to the average 'Murican as #CSwag420Blazikinbestpony
     
    Last edited: Mar 16, 2015
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    In so far as having a prior grasp of any language helps you rapidly pick up more languages, yes. But aside from some syntax stuff, UnityScript and JavaScript are actually really different in some fundamental ways - see JavaScript's first-class functions and heavy use of higher-order functions for starters.
     
    Ryiah, Kiwasi and AndrewGrayGames like this.
  5. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Prefer C++? I've nearly 20 years of C++ experience, and that's more than enough slogging through header files, crappy syntax, and long compile times. I cross my fingers that I never have to code in C++ again, though that seems unlikely.

    Gigi
     
    Socrates and AndyLL like this.
  6. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Oh wow, didn't expect that. I guess c++ for unreal won't be a selling point for everyone.
     
  7. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    C++ is a nightmare compared to C#. (Though I hear C++11 adds some better auto memory management, though I've not looked at this, it could solve some issues).

    C++ gives much more flexibility, for better or worse (very likely worse).
    It's easy to shoot yourself in the foot with C++.
     
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think most people use C# because they're smart enough to know that C# is simply a better, more capable language that can simply do more.

    JS is a very similar syntax, especially when working in Unity so its trivial to cross over and reap the benefits. There aren't any benefits to JS. Using Unity JS is like giving a kid sweets instead of a balanced meal.

    I shipped a few games in JS. I know for a fact this game I'm doing now would rapidly fall apart with JS. C# allows you to develop projects more elegantly with less code than JS, so the argument that JS is easier, is actually wrong if you're making a full game instead of a crappy demo.

    Anyway, language war. It's been done 10000 times on the forum.
     
    Socrates, Gigiwoo and Ryiah like this.
Thread Status:
Not open for further replies.