3 ms·
Ok. And if you call into non-D code, like C or assembly? I think this is just moving potential problem under rug, which is best it can do, given Rice Theorem
by Ygg2 7y ago
Ok. And if you call into non-D code, like C or assembly?
I think this is just moving potential problem under rug, which is best it can do, given Rice Theorem
- WalterBright 7y agoCalling non-D functions means the compiler cannot check them, and will rely on the user having correctly specified and annotated the function signature. I.e. you can have "unsafe" annotated code which the compiler doesn't check, which is indeed where the dirty deeds get swept. For example, I doubt someone could write a guaranteed safe implementation of malloc(). The idea, naturally, is to specifically mark such sections so that your crack QA team knows what to focus on, and to minimize the amount of such code. The trick is to make the safe sections expressive enough that it is practical to write the bulk of the code in safe sections, thereby minimizing the "threat surface".