4 ms·
I wonder if Unity regrets using Mono / C# as their scripting language, it seems like they have so many workarounds and hoops that they jump through that it must
by disordinary 9y ago
I wonder if Unity regrets using Mono / C# as their scripting language, it seems like they have so many workarounds and hoops that they jump through that it must be a nightmare to maintain.
- fsloth 9y agoI don't think so. The tooling and mindshare one gets with C# should be tremendously valuable. There are not that many options for performant languages which provide all the things C# ecosystem provides out of the box.
- kevingadd 9y agoI don't think they had any better options available to them at the time. Embedding and integration for an engine like Unity is just a tremendous challenge no matter what stack you use. I've done this sort of integration w/ various languages (python, lua, vbscript, c#, actionscript, javascript, etc) and C# is one of the most reasonable choices, if only because it was designed with native interop scenarios in mind. There are pointers, there are structs, etc. Also keep in mind Unity did offer multiple scripting solutions - they had Boo for a while (eventually dropped), and there's UnityScript, though I'm not super familiar with how it works... C# is the one that won.
- coldacid 9y agoWasn't UnityScript just Unity-flavoured JS, like ActionScript was for Flash?
- pjmlp 9y agoNot at all, actually they are doubling down on C#. Developed a new compiler for a subset of C# that they call High Performance C#, and are porting engine code from C++ to HPC#. Unity was also one of the contributors to the new C# 7.x safer low level programming features. Lots of GDC 2018 talks about how it all works.
- SomeHacker44 9y agoI've tried many languages for the last 35 years and C# is, at least of the C-style OO-focused languages, one of the nicer ones if not the nicest one. Microsoft has been doing very nice things with it the last several years, especially. I, for one, am very happy with C# in Unity. I would still prefer a LISP (Arcadia/Clojure comes to mind) as a first class citizen, and support for a truly functional language (such as F#) would be nice, but I can live with C#, especially with the more-functional C#6 and .NET 4.6/.7 support in the latest Unity versions. If Unity supported CoreCLR and all CLR languages natively, as well as NuGet, along with Rider (or VS/VSCode) it would be a near-perfect development environment for games, IMO. Not necessarily for everyone and everything, but enough to be good for many things and many people, including amateurs and learners.