Would C# be considered a niche language?
Hello, I was wondering how C# compares against other frequently used programming languages for game dev such as C++, python and javascript. I started out on Unity so C# is pretty much the only language I am comfortable with presently, but what if, for example, I want to apply to work in a studio that develops in Unreal or another engine that uses another language? Is it a very big jump to pick up another coding language if I started out with C#, or are the elements mostly similar; and would it actually be necessary to know 2 or more languages?
About this post
- Posted
- Archived
- Score
- 2 · 100% up
- Kind
- Text
- ID
- od2plk
4 comments
If you picked up one you can pick up others.
If you only know C#, chances are you are not familiar with pointers, the difference between stack and heap, data oriented programming, memory layouts and others. If you learn C++ you will get familiar with those, and while you might not use it directly in C#, it will make you understand how C# works on lower level, therefore making you a better C# programmer.
This is a good answer, I'll add to it by answering the javascript portion of the question. Javascript is mostly used for web programming. It's not typically used for game programming especially in large game studios. There are some javascript-based engines like phaser and other scripting languages used in games (like Lua) that are similar to javascript. The main differences between c# and javascript are that c# is strongly typed types evaluated at compile time) while javascript is dynamically typed (types evaluated at runtime) and that c# is synchronous while javascript is asynchronous.
Statically vs dynamically typed means that you aren't assigning types to variables in javascript, this making javascript a bit of a "looser" lamguage. Synchronous vs asynchronous means that c# will execute code in a reliable order outside of async operations like coroutines. Javascript execution order is not guaranteed in the same way so you have to take steps when performing asynchronous operations like web requests or large operations to ensure your code executes in the desired order.
This helps put things into perspective. Thank you!
If you want code all yourself or make new features - C++ must have (Unity written on C++) If all you need is do things in editor and add little scripting - C# is ok. Before do something in UE with C++ you must learn language on good level, maybe at that time Unreal will be too boring for you, why use it, if you can write all yourself on C++?