1,123 karma · joined February 12, 2020
In fact, a myriad of games (and other kinds of simulations) have been doing exactly that for a very long time.
What all great chess players have in common is an amazing memory and the will to think and work on chess all day long (which is more astonishing to me than the memory side).
There is also a lot of software for which the source is not available anymore.
There is no silver bullet. There are decades of academic research and engineering on this and we have yet to reach a good answer.
Copying and passing immutable data around is not always fast enough and definitely not trivial to merge the results back.
In summary, it is a hard problem with no general solution. If you could solve it, then you have solved multithreading design for any problem.
And I am not sure Vulkan runs everywhere... what about consoles?
Then you also get implementations of other APIs like Direct3D on top on Vulkan, which is amazing because you can reuse all your code and tooling and run everywhere.
Vulkan is not hardware-specific, it is an open, cross platform standard like OpenGL.
Direct3D is not standard, but it is so well supported and used (even in Linux!) that you can consider it one.
People want cheap everything, and a race to the bottom happens.
It seems strange to have a cast as a safe operation and yet return results that are almost surely a bug. This means I will avoid casts altogether in my code, and I do hope they get rid of them at some point as some have suggested.
There is: you panic, like in the array case.
That would have been much robust (at the cost of performance).
At least that was how things were around >10 years ago, not sure about the current state of things. Anyone can chime in? Do embedded vendors etc. provide proper forks of newish, modern compilers?
Thus avoiding shutdown logic is sloppy engineering to say the least. Same for ignoring the need to design the system to avoid crashes to begin with, including OOM ones.
This has nothing to do with ensuring your system is OK on crash, which is another side of robustness.
They are not "bizarre concoctions".
Even if it was true that Rust is big on that, such a function is not "holding it wrong", it is just a matter of convenience and development speed vs. performance.
For the vast majority of code it does not matter whether you allocate a few times or not. The timing difference is in the noise.
Let Rust be a convenient language rather than a PITA.