news.volyx.in

Why I Write Games in C (yes, C) (jonathanwhiting.com)

647 points by WoodenChair · 2583 days ago · 544 comments on HN

Article summary

The author explains why they prefer to write games in C, citing its reliability, portability, and simplicity as key factors. They also mention their dislike for C++ due to its complexity and slow compilation time. The author acknowledges that their preference for C is unusual, but it works best for their needs. They also discuss alternative languages, such as Go and Haxe, but find them lacking in certain areas.

Main themes

  • C programming language
  • Game development
  • Language choice
  • Reliability and portability
  • Simplicity and complexity

What commenters say

  • Using a C++ compiler to compile C code can help catch bugs at compile time, but may not be the best approach due to differences in language features.
  • C is a reliable and simple language, but its lack of features and safety guarantees can make it error-prone.
  • Rust is a viable alternative to C, offering memory safety and performance, but its complexity and verbosity can be off-putting to some developers.
  • The choice of programming language ultimately depends on personal preference and the specific needs of the project, with no one language being universally superior.
  • Some developers prefer C's simplicity and lack of object-oriented programming features, while others find it too low-level and error-prone.
  • Compile times and performance are important considerations when choosing a programming language, with some languages offering faster compilation and execution times than others.
  • The trade-offs between language features, performance, and safety guarantees are complex and depend on the specific use case and developer preferences.