Yes, that what I said.

I was not talking about pseudo random number generators, I meant actual random. As in accessing arrays out of bounds, use after free, overflows and so on producing results we cannot determine. At least not by referring to the C++ language specification.

My argument is that it's not just easier to end up with undefined behavior in C++ it is almost 100% certain.

Consider all the possible arrangements of characters one could type into ones editor to create a program. Say one million characters in your program. That is a number far bigger than the number of elementary particles in the universe.

Now lets remove all those permutations that the compiler rejects. That still leaves us with an overwhelmingly huge number of possible programs that will actually load and try to run.

Of those, the number that actually produce results that are defined by the C++ specification is vanishingly small. The probability of programmers ever finding a program without UB is approximately zero. Think monkeys with type writers and hoping to get Shakespeare.

In short C++ is not a Turing machine and nothing predictable.

Is it actually possible to end up with UB in Rust, without using unsafe?