Any examples of this being used for something non-trivial? I'm generally curious because I figured Golang would be a no-go due to the GC...
Any examples of this being used for something non-trivial? I'm generally curious because I figured Golang would be a no-go due to the GC...
I do have mixed feelings about LLVM for safe GC'd languages, though. LLVM is full of undefined behavior, and its support for precise moving tracing GC is not widely used. So I can definitely sympathize with not wanting to use LLVM for Go, but not for the reasons they cited.
What constitutes 'fine' depends on workflow, size of project, machine horsepower, and personal preference. Some projects require a bit more compile -> experiment -> change -> compile -> experiment -> change than others.
Huh? Tons of GC languages are used for games. Heck, web games use JS. Not to mention the whole C#/Unity thing that even powers AAA games...
You'd almost truly have to go out of your way to consume browser-levels of memory.
It's a fight against the GC typically
Many forget that MSIL is rich enough to support C++, initially via Managed C++, later replaced by C++/CLI.
The major features in C# 7.3 are related to slices, improved stack allocation and reducing copies of value types.
It is, but it's still an option. It's not like "language with GC" == no-go for games, as the parent implied.
In a lot of 2D games, simple patterns like object pooling are more than enough to squash any GC problems. There's a whole spectrum of performance requirements out there -- no need to discount a framework due to it's language.
It's truly wonderful time for all programming languages in this space.
I'm close to implementing hot code update -- in my Go game servers!
It is a matter how it gets used, not that it is present.
Seems like it can go sub 1ms
As a practical example, capturing variables in a closure will usually cause them to be heap allocated in Go, but in C++ capturing has no effect on variable storage.
In my view (which is the dominant view among compiler engineers for GC'd languages), spending a lot of effort to avoid allocation is a poor use of programmer time in a GC'd language. It is better to just improve the GC to make allocation fast. In a properly designed generational GC like that of Java HotSpot, allocation is about 5 instructions. That is a game changer: allocation is as cheap as a function call plus the prologue.
Unfortunately, Go's designers have so far not deployed generational GC, which is why we keep having these threads about avoiding allocation. (I've seen indications in the last couple of weeks that Go may finally be moving to a generational GC, though, and I hope they do.)
Then I fully agree with you.