like "micro controllers, AAA game engines, and web rendering engines"? I highly doubt it! Swift 5+ might have a chance but Go has none(as it is now).
like "micro controllers, AAA game engines, and web rendering engines"? I highly doubt it! Swift 5+ might have a chance but Go has none(as it is now).
C# is about the closest thing these days thanks to value types but even then Unity had to drop down to C++ to really get the performance they needed at the engine level.
C# is fine for scripting, but absolutely terrible for performance critical batching where branch predictions and cache misses are your main optimization points.
Also the lack of array slices make it really hard to avoid memory allocations.
I love scripting languages for orchestrating logic(luaJIT!) but when you need to massively vectorize your data so that you get full utilization of the prefetcher there really is no substitute.
As long as it lacks Windows support Swift has no chance to be even considered for an AAA game engine.
Also, most of the applications never allocate because they can't even afford the overhead of pooling/freelists that come with a stock malloc implementation.
You're using value types and raw pointers in those targets because even the memory overhead of a heap/freelist/etc can be too much. With things like AVR you're looking at 512B to 16kB of total memory(part of which includes the code you write).
i'm not sure i follow - you're saying that a gc existing implies that one cannot preallocate and avoid dynamic allocation?
This will still use dynamic allocation to do the preallocation. You'll have a heap to track this which comes with its own overhead.
I believe the C/C++ developers will look for a Rust-like solution(even if I don't like Rust) rather than Go if crashing is an issue. Go doesn't solve the crashing issues. It has its own crashing issues(e.g. dereferencing nil pointers , deadlocks, data-races, nil and nil interfaces etc). If the GC is not an issue they can choose any other GC language so Go is not that special anymore in this regard. The truth is that Go has its own niche and that's web services.
Last I checked it had absolutely terrible reflection capabilities and meta-programming; both of which are used as the foundations of modern engines.
A game engine is also radically different than your usual use of Rust; its almost impossible to model with borrows without going dynamic and those come with runtime overhead; something not acceptable when you're used to zero-cost abstractions.
A web rendering engine has ridiculously less state and moving parts than a game engine. D would be a much better fit for game engines than Rust.
http://stroustrup.com/applications.html
A big list.