*Deep breath*
When I use a tool, I like to fully understand how to use it. I used to use photoshop, but I switched to pixel art programs. I used to use word processors, now I use notepad. If I'm weighed down by lots of features I'll never use, it distracts me from working.
And that's the primary issue I have with C++. Over the weekend, I programmed my own Entity Component System modelled after EntityX. I learned about namespaces, templates, variadic functions, friend classes and static casting. I fully understood all of this and finished my ECS, but I felt frustrated by the number of obscure quirks I had to learn. I can store an array of templated objects in an array, but first I need to create an empty parent object and fill the array with that. Then I static_cast the parent object to the templated child object and use that pointer to access the data in the component array and ARRRRGH!
And yes, before anyone says anything, I know I can use [obscure feature] or [programming paradigm] or [game programming pattern] to fix my problem. Which brings me to my next point...paradigms in C++. So many options! Procedural, object-oriented, generic, metaprogramming, data-driven...but can anyone agree on them? Nope! In every StackOverflow post you find, you have 5 different people arguing the
best and
correct way to do something in C++. For someone learning the language, it's overwhelming. You have people writing C-style code, plain C++, modern C++11, boost C++...the language tries to accomodate everything and the kitchen sink and is a massive mess as a result. On StackOverflow, I've seen people who have professionally programmed for in C++ for 20+ years and are frequently surprised at the new features they find.
C++ has a complex 33 year history behind it spanning multiple standards and maintainers. Every addition adds new features like iterators, lambda expressions and type deduction, but depreciated features like va_list are kept in the language. Learning anything in C++ requires prying back decades of development and understanding the history of the ISO standard. As an example: take template definitions. In tutorials, people use both <class T> and <typename T>, often interchangeably. For someone learning about templates, that's really confusing! So I looked it up and found
this. Basically, over a decade ago some committee decided that <typename T> would clear up the confusion of future programmers. In reality, it accomplished the exact opposite.
And its for that reason I want to switch languages after months of dedicating myself to C++. As time went on, things became less about
making a game and more about
learning the quirks of the language. I wanted to focus on making a game, but not see the sacrifice of speed or control that comes with engines like Game Maker. And ultimately, I guess C++ isn't the tool for me.
In contrast, both Java and C are easier languages to learn and fully understand. From what I understand, Java is aggressively object-oriented so you don't have to pick from a dozen different progamming paradigms. C is very bare-bones, but lightning-fast and possible for mere mortals to fully understand. I know things overall will be more difficult in C (less syntax but more memory management) but I at least want to give it a shot.
In the end, I'll probably end up crawling back to the monstrous mess that is C++. But at least I'll have tried something different! And who knows? Next time, maybe I'll stick to the basic C++ features and ignore the dozens of options modern C++ provides.