Going from C# to C++ in preparation of …”something”

After a few years of developing only in C# (all my hobby projects, e.g. modding tools, as well as my thesis, were written in C#, targeting .NET 4 and using WPF for the pretty (the what?) UI), I’m “back” to C++. To be brutally honest, I haven’t used C++ much. I did use it for whatever university assignments I had that required it, and I learned some pretty basic and important concepts with it, such as server-client architecture, multi-threading, message passing, parallelism. Only reason I didn’t get into it more was because when I did decide to get in trouble and start developing on a daily basis on projects I loved, I had already discovered C#. C# promised the power of C++, with a minimal amount of the trouble that C++ could cause you. Its power, the level of automation and abstraction the .NET platform offered, and how well tied it was with Visual Studio made it an absolute pleasure of a language to develop in. I could do everything I wanted, I had Visual Studio’s magnificent visual debugger, IntelliSense, documentation, I had LINQ; you could say the world was my oyster. And I created some useful things with it. All my modding tools were put to use by the basketball modding community, and NBA Stats Tracker was even used by a varsity basketball team in the US. I learned a whole fucking lot from using C#. My first big project, the delicateness of code where a single, innocent-looking change can break so many things in the rest of your project, trying to refactor and messing things up, trying to find what went wrong in a stack trace that was 9 calls deep, how to properly design an object-oriented program, what to do when you manage to crash the CLR (yes, that actually happened), so many things that I simply cannot list of the top of my head, really.

But C# is a world of convenience. 50% of what you need to do, it’s there, in the libraries. Memory allocation? Done for you. You declare and allocate everything the same way, not having to worry if something won’t fit in the stack, not having to worry about dangling references, segmentation faults, undefined variables.

Enter C++.

Continue reading