4 ms·
> eliminates very many correct programs While this is also true (there are certainly correct programs that aren't writable in rust without unsafe{}), in this c
by codys 10y ago
> eliminates very many correct programs
While this is also true (there are certainly correct programs that aren't writable in rust without unsafe{}), in this context I'm guessing you mean "incorrect programs".
- paulddraper 10y agoI mean correct, as in "Rust compile-time checks prohibit creating some compiled programs that would correctly produce the desired result". Rice's theorem means that rustc must fail programs that actually don't have memory errors. The same is true of C; some ASM programs can't be transcribed in a way that pleases a C compiler.
- red75prime 10y agoBut it doesn't mean that rustc (or C) will fail to compile all programs, which implement given functionality.
- red75prime 10y agoI don't know what downvoters were thinking. So I'll take a blind shot at explaining. I didn't say that Rice's theorem wasn't true. I said that in this case it doesn't matter. If program fails to compile, you don't give up because of Rice's theorem, you modify program to make it compile. Will it make program less efficient? Who knows. There's no theorem about that. Most likely it will.