10 ms·
I think game programmers don't like type systems -- or rather, they prefer the minimal typing necessary for speed improvements and their ability to simplify bas
by Jach 11y ago
I think game programmers don't like type systems -- or rather, they prefer the minimal typing necessary for speed improvements and their ability to simplify basic static analysis (with tools or in their heads). I don't blame them, games are a lot of work even for relatively simple things, and to get anything done at a reasonable pace you just need to be able to churn out lots of code that compiles on the first try, and when it doesn't the mistakes should be easy to fix and minimize the time you're spending fighting with the type system (C++ templates come to mind as they're often avoided in games no small reason being the cryptic error messages they can produce). There might be an argument of familiarity, that eventually if they used Rust or Haskell enough it would all come to them as easy as C, but then well known Haskell promoters say things like "if you're using the type system right your code will never compile on the first time."
- pcwalton 11y agoWell, it's the classic static versus dynamic typing debate, and the costs and benefits of each approach are well known at this point. In general, I think memory safety and data race freedom speed you up other than for small throwaway programs, because memory issues are so awful to debug (even with things like Valgrind).
- tome 11y ago> the mistakes should be easy to fix and minimize the time you're spending fighting with the type system In Haskell you don't fight the type system. It fights your bugs. [Yes, yes, this isn't an absolute truth, but it is a relative truth when the point of reference is C++'s, or even Java's, type system.]