4 ms·
I was debating over trying out Unreal vs Unity last night. Unreal was looking more capable in its free version than Unity 4 Free, but I would prefer to learn C#
by robertfw 12y ago
I was debating over trying out Unreal vs Unity last night. Unreal was looking more capable in its free version than Unity 4 Free, but I would prefer to learn C# over C++. This release makes it an easy choice to give Unity a whirl!
- higherpurpose 12y agoOne of them should adopt Rust. Let's see who does it first!
- robertfw 12y agoThat is my highest desire and I did look around for some bindings, but I think it's still early.
- chc 12y agoI think it's more likely for Unreal Engine. Epic have said that they're open to new language implementations as long as they are free and open-source (this being why they didn't want C#).
- scott_karana 12y agoThat's changed now, though: Microsoft's Roslyn C# compiler is Apache 2.0 licensed. :-) https://github.com/dotnet/roslyn/blob/master/License.txt https://github.com/dotnet/roslyn/blob/master/License.txt
- alpyne 12y agoUnity does support Clojure (sorta) https://youtube.com/watch?v=tJr_TD1BtF0 https://youtube.com/watch?v=tJr_TD1BtF0
- fredophile 12y agoI've seen this type of comment before but usually in the context of someone that already knows either C# or C++. As someone that doesn't know either what factors make you want to learn C# over C++?
- MichaelGG 12y agoC#'s tooling and ease-of-use really blows C++ away. Plus there's the safety, where it's rather difficult to introduce a memory-safety issue into C# code, vs C++ where we see vulnerabilities every week due to this problem. I doubt people use C++ if they have another choice. The big problem is that C#'s implementations do not handle memory well enough. The default for them is to heap-allocate most objects, then leave it up to the GC. This means a lot of hacky code to achieve good performance, but it still can't match C++ in many cases. (I'd guess that many apps could see a good double-digit% increase in perf in C# if you could just use the stack more often.) Plus, if you can use C#, you can probably use F#, which is a far better language than either C++ or C#. Whereas if you need to be runtime-free and C-ABI compatible, your choices of expressive languages are rather limited (Rust being the most exciting one, probably.) Edit: Also, C++ compilers tend to do a far better job at codegen. Though MS is starting to hint that they're gonna up their JIT story, but they've got a long way to go. Edit: As to why you'd want to learn one or the other, if you're in games, it seems like you should probably learn C++ because it's so prevalent in games. C# is easy enough to pickup on the side though.
- fredophile 12y agoWhile I appreciate your well thought out reply I don't think you have the perspective I'm interested in learning about. From your reply I'd say you already know at least one of the two. I'm interested in knowing why someone without experience in either would choose C# over C++ or vice versa.
- prewett 12y agoMaybe I misunderstand, but I don't think you want the advice of someone who doesn't know either, you want the advice of someone who knows both well. FWIW, I'm a longtime C++ user, and used C# with Unity for a bit. I would recommend C++ if you need high-performance, low-level control, or access to native APIs. I would recommend C# if you want good performance in a Java-like language with the best parts of Java and C++. Also if you want to get a job with the Microsofty sorts of companies that have historically used C#. However, you are more realistically constrained by your 3D engine. Unity does not have the option of C++ (to my knowledge). I'm assuming Unreal does not support C#. In the case of 3D engines your choice of engine is much more important than language.