Hacker News new | ask | show | jobs
by a_t48 2388 days ago
FWIW I’ve never been at a job that allows exceptions...but smart pointers and RAII are great.
2 comments

No exceptions. No exceptions.
Exceptions are being fixed. See https://www.youtube.com/watch?v=os7cqJ5qlzo
On the other side of the coin, I don't think I've ever had a job in which anyone would have ever considered banning exceptions (although I have worked at some where people did know that some other companies did ban them). The world of programming is a very broad church indeed.
Examples of companies or projects that ban exceptions

Google, and therefore Chromium

https://google.github.io/styleguide/cppguide.html

Mozilla, and therefore Firefox

https://firefox-source-docs.mozilla.org/tools/lint/coding-st...

I'm pretty sure WebKit also doesn't use exceptions. It's not listed in their style guide but searching the repo I don't find any instances and the repo history shows turning them off.

Often bare-metal embedded toolchains don't support stack unwinding. I've even worked on an embedded linux where the toolchain didn't support stack unwinding. It made porting certain code to the platform interesting, to say the least.
What kinds of work were you doing that allowed exceptions?
Off the top of my head, just listing a handful of various projects; a commercial static analyser, various GUIs, a broadcast industry projectile tracking and information presenting system, a multiple networked radar (and similar) network data fusion project, broadcast automation software, various data processing and display software sets, software simulating mechanical movement for artificial test data generation, image processing and morphing. I could go on, but hopefully that gives a flavour. A whole big bag of things.

From my perspective, banning exceptions is the exception (a ha ha); not the rule. I've worked on embedded software that (I expect) didn't support exceptions in the provided compiler, but I don't consider that an explicit ban on exceptions - they simply weren't possible.