|
|
|
|
|
by grasleya
3290 days ago
|
|
I can buy using generics sparingly (especially in the form of complex template metaprogramming). But never using it at all? Can you imagine convincing the C++ community to give up Boost because its use of templates is too complex? They also seem to admit that if they were to do it over again and start from scratch they'd use exceptions: > Things would probably be different if we had to do it all over again from scratch. |
|
It seems that thinking on exceptions in low-level languages is firmly in the "no way" camp.
Contrary to popular thinking, exceptions are not free.
For example, when Chrome disabled rtti and C++ exceptions in Chrome codebase, it resulted in saving 6MB (20%) of code. See https://bugs.chromium.org/p/chromium/issues/detail?id=19094
This is when exceptions where not actually used in the code. The bloat is merely from enabling C++ compiler flags to generate rtti and exception support code.