|
|
|
|
|
by taeber
1619 days ago
|
|
I like the idea of automatic resource cleanup in C and was excited when I read the headline, but I agree with others that the proposed syntax doesn't seem very C-like. I previously shared a "with" statement idea on HN that I thought fit with the rest of the language. with (FILE *fp; fp = fopen(path, "wb"); fclose(fp)) {
...
} else {
perror("Failed to open file");
}
https://github.com/taeber/cwithhttps://news.ycombinator.com/item?id=23370693 edit: formatting |
|