This might come off as a naive question, but I am currently trying to modify a user’s code in C# (used to programming in Javascript) and I do not see the benefit of using C#.
From what I see, there is a lot of added syntax, or special exceptions one must implement to get simple things to work (when compared to using Javascript.)
Am I missing something? Or do people use C# out of personal preference?
The added syntax usually comes with a speed increase, like the type casting.
It’s also more standardised than javascript.
I find C# a bit an@l sometimes, coming from a C background.
C# definitely has a bit more syntax that really isn’t necessary for something like Unity, but it has much stronger Object Orientation.
Also, C# allows you to use Visual Studio… which in turn gives you Intellisense. Not only does that mean you barely have to type anything, but it’s essentially inline documentation. Just hit “.” and all the members of a class suddenly appear in a convenient list. It doesn’t get much better than that.
But overall, if you’re not already experienced with compiled languages like C#, Java, or C++, I’d recommend you stick with Javascript. It’s a very easy to use language that’s still very powerful in Unity.
I see – thanks for the feedback guys!