Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Modern C for C++ Peeps. Parent comment
char *buf __attribute__ ((__cleanup__(free_buf))) = malloc(1024);
char* buf = cast(char*)malloc(1024); scope (exit) free(buf);
The rationale for it:
https://dlang.org/articles/exception-safe.html
The idea for this came from Andrei Alexandrescu and Petru Marginean who proposed it for C++:
http://drdobbs.com/184403758
There are no comments on this comment yet.
The rationale for it:
https://dlang.org/articles/exception-safe.html
The idea for this came from Andrei Alexandrescu and Petru Marginean who proposed it for C++:
http://drdobbs.com/184403758