#include <ownership.h> #include <stdio.h> int main() { FILE *owner f = fopen("file.txt", "r"); if (f) fclose(f); }
C programmers uses contracts, these contracts are part of documentation of some API. For instance, if you call fopen you must call fclose.
All we need is to create contracts that the compiler can read and verify automatically.
C programmers uses contracts, these contracts are part of documentation of some API. For instance, if you call fopen you must call fclose.
All we need is to create contracts that the compiler can read and verify automatically.