4 ms·
Go also has many disadvantages, compared to plain C.
by Valmar 7y ago
Go also has many disadvantages, compared to plain C.
- xyproto 7y agoCan't think of any. Do you have an example?
- littlestymaar 7y agoYou can't call native libraries without going through cgo. So unless you don't want to have audio, draw text and have access to the graphic APIs, you'll need cgo, which is really slow due to Go's runtime. For game dev, that's a no go (pun intended). Additionally, the Go compiler isn't trying really hard at optimizing your code, which makes it several times slower on a CPU-bound task. That's for a good reason: because for Go's usecase, compile-time is a priority over performances. Saying that there is no drawbacks in Go is just irrational fandom…
- xyproto 7y agoYou are only talking about the Go compiler from Google. GCC also supports Go (gccgo) and can call native libraries just like from C. I'm not saying there are no drawbacks in Go, just that I can't think of any advantages of C over Go.