4 ms·
The article mixes up the virtues of a programming language with the quality of the environment. C might very well be the best language in our current environmen
by _ph_ 11y ago
The article mixes up the virtues of a programming language with the quality of the environment. C might very well be the best language in our current environment, which says little about the language itself. One major point certainly is, that it is that good compilers are available everywhere and almost any library can be used from C. There are a lot of historic reasons for that.
If he wants strict typing, C is actually much worse than many languages of its time. But it is certainly stricter than Javascript.
GCs and gaming are of course a challenge, but with the new GC of Go1.5 and hopefully futher improvements, it might actually become a very good language for gaming, especially if there is a better support with libraries. But if one wants good type checking, a simple language model and fast compilation times, it checks all the boxes.
- dottrap 11y agoThe Google Go team lives in a completely different environment. Their perspective of performance is not the same as a game dev. Go 1.5 stated their goal was 10ms GC latency. A game loop is 16ms for a 60fps game. 10ms is not close to acceptable. Fast for a web server backend, but not fast for a game.
- _ph_ 11y agoI have not experimented with the Go GC under heavy loads yet, but the important points of 1.5 are, that the GC pauses have an upper limit of about 10ms for multi-gigabyte heaps - previously they could be up to a second, and often are much faster (in a game environment with smaller heaps, they might actually as low as 1ms, which would be acceptable). I wrote, that there might be further tweaks required, i.e. having an API to call the GC for a set number of milliseconds. If your code isn't 100% using the time slice for each frame, it could use the remaining part of each time slice for garbage collection, eliminating the need for blocking stops. So, whether Go is acceptable now entirely would depend on some measurements. And if not, could be possibly tweaked. As I wrote, I would rather count this under "environment" where C might still win.