4 ms·
C compilers have scope guard extensions. http://echorand.me/site/notes/articles/c_cleanup/cleanup_attribute_c.html http://echorand.me/site/notes/articles/c_clea
by rjeli 9y ago
C compilers have scope guard extensions. http://echorand.me/site/notes/articles/c_cleanup/cleanup_attribute_c.html http://echorand.me/site/notes/articles/c_cleanup/cleanup_att...
Systemd uses it: https://github.com/systemd/systemd/blob/5809f340fd7e5e6c76e229059c50d92e1f57e8d8/src/basic/alloc-util.h#L50-L54 https://github.com/systemd/systemd/blob/5809f340fd7e5e6c76e2...
- pjmlp 9y agoLanguage extensions is the keyword here. Some people rather use official language features.
- auvrw 9y agopart of making a new operating system could be getting to muck with the language features ... ... i suppose this project is locked into G-standard C++ and with lots of good reasons (e.g. toolchain). although i'm an anti-C++ person, i suppose the sorts of tools available internal to Alphabet make it much more manageable. anyway, for an example of the original premise: i'm slowly learning some things about plan 9 C via 9front.. there are some departures from ANSI C, including additional features like (completely undocumented, except for the relatively compact source) operator overloading. equally important for the type of person that finds C++ too busy, some features (e.g. certain preprocessor features) are removed.