in reply to Re^4: SQL: Update column(s) value with extra WHERE
in thread SQL: Update column(s) value with extra WHERE

> For programs in C/C++ where exception handling can get messy and affects the performance (which is the whole reason for using C/C++) there's a decent reason to avoid exceptions and use return codes

Nowadays, performance is almost never a reason to avoid exceptions in C++. The only exception (pun intended) I'm aware of is hard real-time applications where people might die if a computation takes too long (in such applications, even malloc is banned).

> There's also a perfect reason for using return codes on actions where failure is common or expected, and where a user will likely have a fall-back plan

Yes. Though more or less a matter of taste, the code can sometimes look simpler and clearer to me when checking for common and expected failure return codes, rather than throwing and catching exceptions.

See also:

Real-time Computing References

Virtual Machines References

  • Comment on Re^5: SQL: Update column(s) value with extra WHERE (Real-time Computing and Virtual Machine References)
  • Download Code