2 ms·
Yes, for the general problem you want dependent types (or similar). There are middle grounds, of course: you can let the compiler figure out on its own what it
by eru 9y ago
Yes, for the general problem you want dependent types (or similar).
There are middle grounds, of course: you can let the compiler figure out on its own what it can, and let it insert runtime checks for the other cases.
And add some way for the programmer to declare that eg "warn me if this can't be optimized" or "trust me, this is safe" or even "here's a proof for you".
But in any case, dependent types are possible---undecidability is not a hard barrier here.