← Back to context

Comment by _flux

10 days ago

I suggest you point the exact statement where I claimed the corresponding safe Rust program is impossible to fix to avoid unsound behavior.

I hold the argument that if the Rust compiler produces unsound behavior for safe Rust, then the compiler needs to be fixed.

The original comment I replied to, in which you claimed that the difference between a safe Rust and C++ program with unsound behavior is that the C++ program needs to be fixed, but for the Rust program, the compiler needs to be fixed.

As I see it, in either case, the program can be fixed, or the compiler can be fixed. The only difference as I see it is that the C++ spec does not expect the compiler to be fixed.

Did I misunderstand your post?

  • I would say as stated there were two ways to read the claim:

    - either that the claims are paired as you say (the second one implying that the program cannot be fixed),

    - or that the claims are completely distinct, that simply state the desirable state of things.

    Using the second interpretation, the corollaries would be:

    - there is (typically) no reasonable fix for the C++ compiler that would address the UB. Therefore to fix the UB all C++ programs exhibiting the same need to be fixed, which is hard, as the compiler will keep accepting them.

    - once the Rust compiler is fixed, then all safe Rust programs exploiting the bug must now be fixed, or the compiler will reject them.

    What I would sign under would be the second interpretation, not the first one. But I intentionally also selected the particular ambiguous form due to the cutesy, albeit misleading, symmetry of the statements.

    • I understand and do agree with you following your intended interpretation. Thank you for the patience and explanation.