Reputation
817
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
1 6 12
Newest
 Yearling
Impact
~22k people reached

  • 0 posts edited
  • 0 helpful flags
  • 176 votes cast
Dec
8
comment Make a big deal out of == true?
@DavidThornley, turn on warnings in your compiler. Treating warnings as errors is better defensive programming technique rather than avoiding ==.
Dec
7
comment C++ and system exceptions
"You are still ranting. It's not how you imagined it, so what?" - no, I know that almost all *nix programmers don't understand what is SEH for. However Windows VC++\Delphi programmers who use try block for dealing with third-party closed-source code don't understand how to leave without it.
Dec
7
comment C++ and system exceptions
And I'm not talking about catch, I'm about RAII.
Dec
7
comment C++ and system exceptions
@Patrick, this function works only for MSVC.
Dec
7
comment Best practice in setting return value (use else or?)
@Ryathal, I don't see any ambiguity there.
Dec
7
revised Best practice in setting return value (use else or?)
added 120 characters in body
Dec
7
comment C++ and system exceptions
@DeadMG, there is nothing fatal with null pointer dereference - it doesn't mean that data are corrupted, or another really bad thing happen.
Dec
7
comment C++ and system exceptions
There is no problem with MSVC, but I want to use g++ and other compilers, which doesn't support SEH on Windows.
Dec
7
revised C++ and system exceptions
added 929 characters in body
Dec
7
comment C++ and system exceptions
@delnan why my code? It can be third party dynamically linked code (plugin).
Dec
7
comment C++ and system exceptions
"Win32 exceptions are thrown in fatal cases from which you can't really recover" - it's incorrect. In VC++ all exceptions are implemented as system exceptions, and they definitely are non-fatal. Also, memory access violation can be non-fatal exceptions, nothing fatal will happen if replace if (p) with try block.
Dec
7
answered Best practice in setting return value (use else or?)
Dec
7
comment C++ and system exceptions
Why not to use system exceptions wherever it's possible, instead of not to use them at all?
Dec
7
asked C++ and system exceptions
Dec
1
comment Is it better to use preprocessor directive or if(constant) statement?
"Never USE preprocessor directives #ifdef to #endif crossing the scope or { ... }" it depends on IDE. If IDE recognizes inactive preprocessor blocks and collapses them or shows with different color, it's not confusing.
Dec
1
awarded  Editor
Dec
1
revised Elegant ways to handle if(if else) else
added 1114 characters in body
Dec
1
awarded  Commentator
Nov
30
awarded  Good Answer
Nov
30
awarded  Mortarboard