| >Same with C++, we were the outliers until console vendors started pushing C++ into devs. See Mike Acton's talks about about how he enjoyed having been forced to move from C into C++. The first (major) console C++ SDK library is GNM/GNMX for PS4. Are you saying C++ games has been outliers till 201x? I guess this depends on how you define outliers then. Other than the guy casting his game writing on youtube (Code Hero?) I don't know of any significant titles in C past 2000. I have not seen all the games but I shipped a few myself and have friends working on many more and nobody that I know had been writing pure C. Think of all vtbl-> you'd have to write if you are targeting Windows/Xbox just for the pleasure to name your source file .c instead of .cpp! >What one gets is type safety Thanks, we've got this in C++ already. >You know exactly who is responsible for releasing it, there are no double deallocations, releasing invalid addresses, or having to deal with library specific smart pointers (CPtr, QSmartPtr, unique_ptr, my_in-house_ptr, ...). Never had been a problem for me. The only game I touched that had smart pointers had them because it used NetImmerse and it got cancelled anyways. >Having a GC doesn't preclude lack of support for cache handling or SIMD. I don't know what is cache handling, to be honest, but what I meant is that, since GC moves stuff around memory, it's likely to create cache hazards. And since it probably uses a single pool, you cannot change cache policies on per-entity basis. >As for JIT quality, it is no different from any other compiler, otherwise as I referred, why not discuss C performance using MS-DOS compiler's benchmarks. Really? You believe JIT will be on-par with a profile assisted, bruteforcing compiler, which can spend a week optimizing a single function? |
The major C++ SDK was the DirectX SDK for the Sega Saturn.
> Are you saying C++ games has been outliers till 201x?
Yes, the code was basically C compiled with C++ compiler.
> >What one gets is type safety
> Thanks, we've got this in C++ already.
Not when what most write is actually C compiled with C++ compiler.
> I don't know what is cache handling, to be honest, but what I meant is that, since GC moves stuff around memory
Is the ability to write cache friendly code.
If you don't want the GC to move memory around then don't allocate it via the GC.
Many GC enabled languages also allow for global statics and stack allocation. Even C# has some support here, even if it isn't comparable to what Modula-3 or D allow for.
Also there is also the possibility to just allocate it off GC heap.
> Really? You believe JIT will be on-par with a profile assisted, bruteforcing compiler, which can spend a week optimizing a single function?
No, but JITs can also make use of PGO just like AOT compilers. IBM J9 JIT and .NET RyuJIT have such support.
Also many GC enabled languages, including C# do have AOT compilers to native code code as well, it is not as JIT is the only viable approach.