Jump to content

David Heffernan

Members
  • Content Count

    3536
  • Joined

  • Last visited

  • Days Won

    175

Posts posted by David Heffernan


  1. They all do different things. Rather than have us explain this, did you read the documentation? 

     

    I don't think that item 3 is very widely used. However meta classes, item 2, is widely used. Classic example is the streaming framework. It is used when you need to instantiate a class whose identity is only known at runtime. When streaming properties the framework reads the class name, looks it up using RTTI and then uses meta classes to instantiate the instance if that dynamically determined type. Always seen with virtual constructors. 

    • Thanks 1

  2. People for sure would rather have an error message than incorrect results. You are just kidding yourself if you say otherwise. It's simple human denial. 

     

    Suppressing errors will result in a program with more defects. We all know this to be true. And yet people still choose the path with more defects. 

     

    What happens when you access an array out of bounds with range checking disabled? Perhaps the memory is valid and so the program continues running. But now it's behaviour is unpredictable. Often you will corrupt memory which leads to obscure errors later that you can't tie back to the original defect. Or quite often it's a straight AV which is hardly preferable to a range check error, since it isn't reproducible.


  3. 8 minutes ago, Vandrovnik said:

    Of course I cannot guarentee it. But you wrote "Giving the user the wrong results is always worse than showing an error, even if the error is poorly worded.", so I gave you an example, where error message would be worse than ignoring the error.

    Yes, but since you don't know that the error will be inconsequential, it's kinda pointless looking at the impact. 


  4. 16 minutes ago, Sherlock said:

    Well, not showing exceptions and eliminating exception handling altogether are two different pairs of shoes, are they not? Why not log into some %APPDATA% folder every bug, that occurs and try to keep the application running. When a bug does manage to get reported ask someone to send you the (doubtlessly numerous) log files.

    Apple for example highly discourages to display error messages in their iOS human interface guidelines. BUT they do encourage logging, and offer means to retrieve those logs from devices.

    Better hope that the incorrect information that you show to the user is inconsequential. 


  5. 13 minutes ago, Vandrovnik said:

    Not always... In an application drawing 3D scene, a small error in object displayed somewhere far away from the observer does not metter, probably nobody notices. Of course in a book-keeping application the situation is quite different.

    I'm amazed that you can guarantee that the error will be far away from the observer. How did you do that? 

×