2 ms·
It's because it is fast. I write small video games, and I have performance metrics I need to hit. Other languages may be nicer to write, but if it is at the cos
by suby 3y ago
It's because it is fast. I write small video games, and I have performance metrics I need to hit. Other languages may be nicer to write, but if it is at the cost of performance, it is making my life harder. Up until recently, if you wanted a language which didn't hurt you in performance, your choices were basically C or C++. You can debate whether C++ is better than C, but it has a lot more features, many of which I would miss if I had to use C.
Every language which attempted to compete with C++ did so with automatic memory management or other features which were bad for performance. If the goal is to kill C++, they made the wrong tradeoffs and introduced anti-features from a C++ pov. Only recently have we gotten languages which actually compete with C++ on this level like Rust, Zig, Odin, etc.
It's also because it extend C, and C is the linga-franca of programming.