News for hackers. Stuff that matters.
Re:How to write better game libraries by a_t48 on Sunday December 08, 2019 @04:04AM (#21735011)
FWIW I’ve never been at a job that allows exceptions...but smart pointers and RAII are great.
Re:How to write better game libraries by jstanley on Sunday December 08, 2019 @05:29AM (#21735228)
No exceptions. No exceptions.
Re:How to write better game libraries by je42 on Sunday December 08, 2019 @06:11AM (#21735352)
Exceptions are being fixed. See https://www.youtube.com/watch?v=os7cqJ5qlzo
Re:How to write better game libraries by EliRivers on Sunday December 08, 2019 @10:02AM (#21736177)
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.
Re:How to write better game libraries by greggman2 on Sunday December 08, 2019 @11:40AM (#21736715)
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.

Re:How to write better game libraries by snovv_crash on Sunday December 08, 2019 @01:14PM (#21737210)
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.
Re:How to write better game libraries by a_t48 on Sunday December 08, 2019 @02:30PM (#21737692)
What kinds of work were you doing that allowed exceptions?
Re:How to write better game libraries by EliRivers on Monday December 09, 2019 @10:46AM (#21743570)
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.