logoalt Hacker News

smallstepformantoday at 10:26 AM2 repliesview on HN

Well, in the real world we need at least polymorphism and operator overloading, but that is against the core Zig philosophy, so serious GameDev ignores it (which ironically one would think is the biggest core market for low level systems programming). Hence why new GameDev development still chooses C++, and Andrew’s project fails to gain a significant boost in users.


Replies

flohofwoetoday at 11:15 AM

> in the real world we need at least polymorphism and operator overloading

Maybe in your real-world ;)

Building your game code around classes with virtual methods has been a bad idea since at least the early 2000s (but both static and dynamic polymorphism is something that Zig can do just fine when needed), and the only important use case for operator overloading in game-dev is vector/matrix math, where Zig is going down a different road (using builting vector types, which maybe one day will be extended with a builtin matrix type - there is some interest in using Zig for GPU code, and at least this use cases will require proper vector/matrix primitives - but not operator overloading).

mghackerladytoday at 2:10 PM

>polymorphism and operator overloading

Gee, this new C language and UNIX operating system sure seem cool but someone ought to tell those poor people at bell labs that they'll never catch on without them