Anonymous
dx or vulkan?
Dima
vulkan
Dima
is alltime winner
Anonymous
dx or vulkan?
we diverged completely
Anonymous
LOL
olli
btw from google
olli
On their face, the benefits of using exceptions outweigh the costs, especially in new projects
Ибраги́м
use unions
I prefer structs for sanity. But Unions will be used when they're needed
Anonymous
only for small projects
olli
only for small projects
because google is known for small projects...
Anonymous
after like 10-15 thousand lines of code it becomes insane
olli
C++ exceptions have no overhead until thrown.. that's a really cool property
olli
https://google.github.io/styleguide/cppguide.html#Exceptions
Anonymous
funny thing is google does not use exceptions for a few things
Anonymous
https://groups.google.com/forum/#!topic/ceres-solver/wWMoEGBKuvE
Anonymous
see
Anonymous
ceres is now owned by google
olli
so what?
Dima
look at UE source code, no exceptions are used there
Dima
except 3rd libraries
Max
so what?
exceptions are not the ultimate answer to the error handling question
olli
exceptions are not the ultimate answer to the error handling question
that's correct. But they are not as terrible as mentioned here
Max
different areas, different tools
Anonymous
they are not even close
Anonymous
we need more complex error handling
Anonymous
they work only on small projects
Dima
mmm some meaningful words from you
Anonymous
because with large projects you will have a huge number of different exceptions
Anonymous
and this creates huge error handling codes for 1 or 2 library calls
Max
that's correct. But they are not as terrible as mentioned here
they are terrible enough to avoid them in RT or memory constrained situations. which are so to speak are raised more often than people think.
Anonymous
mmm some meaningful words from you
everything i say is meaningful
Max
let the holy war begin
Dima
nah
Anonymous
let the holy war begin
i pick the templars
Max
finally this chat has upper-mid discussion level
Anonymous
HOLY C MASTER RACE
Anonymous
finally this chat has upper-mid discussion level
we had one about not using interrupts when i got here
Ибраги́м
C++ exceptions have no overhead until thrown.. that's a really cool property
And throwing rarely happens except in rare cases. But if you use error_code checking always... you will definitely have those overhead of checking for a value.
Anonymous
TTC?
olli
As always - bench and decide
Anonymous
time triggered coop?
Max
time-triggered cooperative scheduler, one that uses single interrupt from timer to drive tasks
Anonymous
yes
olli
working in ASIL rated environments of course you can't use exceptions. However they work and are not as flawed as you mentioned
Anonymous
well not exactly we can use multiple timers to drive different sets of tasks depending on the cores
Anonymous
but ya
olli
because with large projects you will have a huge number of different exceptions
why should you end up with more exceptions than different error codes?
olli
Exception offer the advantage of separating error handling code - return values don't
Anonymous
why should you end up with more exceptions than different error codes?
adding an error code is 1 addition to an enumeration
Anonymous
adding an exception is a whole new class
Anonymous
Anonymous
and a library global value to set the value of the error
Anonymous
so you can handle it
olli
adding an exception is a whole new class
you are not forced to add a new class
Anonymous
just like errno.h
olli
I think the error handling provided by errno.h is neither a ultimative solution
Anonymous
you are not forced to add a new class
if you want to send out different information from the class like for example a pointer to allocated data or something
olli
why?
olli
in terms of what? using globals is probably no good solution in terms of software quality
Anonymous
less code you have to write
Anonymous
each time you want to use a function with an exception you will need to use a try and catch
Anonymous
if you forget to do this
olli
how do you report an error in a constructor?
Anonymous
and it is very simple to with a large amount of them
Anonymous
olli
each time you want to use a function with an exception you will need to use a try and catch
not every .. you need it in the place you want to handle the error
Anonymous
is the class initialized