3 ms·
Interesting idea, pity about the name. There's a vaguely similar effort with a similarly poor choice of name, Clean C, which is guaranteed to compile as both C
by MaxBarraclough 6y ago
Interesting idea, pity about the name. There's a vaguely similar effort with a similarly poor choice of name, Clean C, which is guaranteed to compile as both C and C++ with the same behaviour (provided there's no undefined behaviour or platform-specific behaviour). [0][1]
> Exception handling is the only C++ language feature which requires significant support from a complex runtime system, and it's the only C++ feature that has a runtime cost even if you don't use it
I don't think that's true. I believe that if you enable RTTI you pay for it even if you don't use it, which is why it's banned in the LLVM codebase. [2]
> Don't use C++ runtime wrapper for C runtime includes (<cstdio>, <cmath>, etc.), use C runtime instead (<stdio.h>, <math.h>, etc.)
I believe this is still supported, but is officially deprecated, for what that's worth. [3]
[0] http://www.qnx.com/developers/docs/qnxcar2/index.jsp?topic=%2Fcom.qnx.doc.neutrino.prog%2Ftopic%2Fhat_Clean_C.html http://www.qnx.com/developers/docs/qnxcar2/index.jsp?topic=%...
[1] https://stackoverflow.com/a/9695020/ https://stackoverflow.com/a/9695020/
[2] https://llvm.org/docs/CodingStandards.html#do-not-use-rtti-or-exceptions https://llvm.org/docs/CodingStandards.html#do-not-use-rtti-o...
[3] https://stackoverflow.com/a/13643019/ https://stackoverflow.com/a/13643019/
edit Correction: It's called Clean C not Clean C++