| > The first (major) console C++ SDK library is GNM/GNMX for PS4. 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. |
a) there was no DirectX SDK for Sega Saturn. b) DirectX SDK (including one for Sega Dreamcast) is not C++. It has C++ bindings but is usable from C.
>Yes, the code was basically C compiled with C++ compiler.
You mean if I have taken that code and compiled with C compiler it worked? You realize even the DirectX C++ wrapper is not already C, right? You know classes, overloads, namespaces are not C?
>Not when what most write is actually C compiled with C++ compiler.
Could you explain exactly how this works? The C++ compiler uses ML to recognize that the code is not exactly following Alexandrescu's book and turns off typechecks? I seriously just don't understand what you mean here. I usually take "C compiled with C++ compiler", "C with classes" etc as "not enough GoF patterns for my taste" but you are making some other claim here it seems.
>If you don't want the GC to move memory around then don't allocate it via the GC.
So, why do you want GC in the first place? For types, which somehow disappeared from C++?
>No, but JITs can also make use of PGO just like AOT compilers.
How exactly does it work? The code stops executing for a week, the profiler gets run to under user credentials and then JIT finally decides?