Linked by Thom Holwerda on Mon 3rd Sep 2012 20:46 UTC, submitted by MOS6510
General Development I like this one: "By definition, a program is an entity that is run by the computer. It talks directly to the CPU and the OS. Code that does not talk directly to the CPU and the OS, but is instead run by some other program that does talk directly to the CPU and the OS, is not a program; it's a script." Here's the other eleven.
Thread beginning with comment 533974
To read all comments associated with this story, please click here.
jido
Member since:
2006-03-06

I agree that exceptions are often ignored when they should be handled with an intelligible error message.

But I disagree that using error structures is a solution. Firstly it is not reasonable to rely on tooling to verify that all error values are tested. Second it is just awkward to return an error structure with each function.

At least, the stack trace printed by a logged exception can be used by developers to locate the issue. Not great, but much better than continuing with erroneous data (in the case of an ignored error value)

I don't think singletons should be used. If you think you need one, use a function which returns an unique object- at least you have the option to generate more of this object if needed, while if you use a real singleton this is not possible.

Reply Score: 1