2 ms·
I think we misunderstand each other on what is “inside-outside”. Sure, you can have a tiny “safe” block in zig, but that won’t be able to use any outside pointe
by kaba0 4y ago
I think we misunderstand each other on what is “inside-outside”. Sure, you can have a tiny “safe” block in zig, but that won’t be able to use any outside pointer safely, and I don’t see much point in that — is that what you mean? Because unless you say that, then no.
Also surely you can write some zig to rust compiler (which mind you, will not compile most of your programs as the equivalent rust is not semantically correct), but there is not much point.
Re code:
let ptr = allocate();
if (undecideableProperty()) {
destroy ptr;
}
print(*ptr);
Insert any number of undecidable property there, one elegant example would be the Goldbach conjecture.
- throwawaymaths 4y agoIf any branch could destroy the pointer, you wouldn't be able to use it later, the static analysis would stop the build. No need to evaulate the undecidable.