|
|
|
|
|
by kjksf
3290 days ago
|
|
If exceptions are so great, why Rust and Swift aren't using them? 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. |
|
Except Go isn't particularly close to the metal anyway. The only way Go is low level is in the same way Java is low level: it's very limited in terms of the programmer's ability to create abstractions.