(no title)
thradams | 2 years ago
#include <ownership.h>
#include <stdio.h>
int main()
{
FILE *owner f = fopen("file.txt", "r");
if (f)
fclose(f);
}
But comparisons are inevitable, and I also think there are lessons learned
in Rust.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.
No comments yet.