1,681 reputation
31839
bio website
location Singapore
age
visits member for 3 years, 11 months
seen 6 hours ago


18h
comment Why have many programmers moved to using exception handling for input or output?
...................................point "programming languages designed in the last 25 years use Exceptions as their main (if not only) error handling mechanism" ipso facto provides 0 reasoning to the judgement of exceptions vs ercodes. Indeed, Joel's article is exactly talking about these languages C# and Java, exceptions give 1) abrupt jump 2) too many exit points.
18h
comment Why have many programmers moved to using exception handling for input or output?
@AK_, If you are going to comment on an answer and say it's wrong, you will provide at least 1 reason why it's wrong. I see zero. Failing to provide any reasons renders your comment empty in content. I see many words from you but no reasoned points made. First thing first, programming languages aren't perfect, the.............................................................................‌​‌​................................
18h
comment Why have many programmers moved to using exception handling for input or output?
................................................................... concept of exceptions vs ercode-based handling. You can do that with either method. Regarding "operating at a far lower level than most code should care about", note that we are not comparing low level code with high level code. We're comparing exceptions vs error-handling in situations where both are available. The flaws of exceptions (the 2 points above) applies to both low level and high level code. The only difference between low level and high level is reliability: whether failure has consequences or not.
18h
comment Why have many programmers moved to using exception handling for input or output?
@DougM, The explanation is so clear and straightforward that if you're asking what the reasons are, I sincerely doubt you had read them. I'll summarize the article: It's due to 1) abrupt jump 2) too many exit points. Regarding "probably WANT a taskbar icon to show its square, even if the icon it was looking for couldn't be shown", That's orthogonal to the ........................................................................
18h
revised Why have many programmers moved to using exception handling for input or output?
edited body
1d
revised Why have many programmers moved to using exception handling for input or output?
edited body
1d
comment Why have many programmers moved to using exception handling for input or output?
"Because input and output are unreliable" does not explain why exceptions are used instead of error-codes. As such, I believe I have a better explanation (despite the -15 downvotes) at programmers.stackexchange.com/a/279911/24257 .
1d
comment Why have many programmers moved to using exception handling for input or output?
@utnapistim, This is an unbalanced comparison. If you wish to weigh the use case whereby we have multiple error codes, you must weigh it against the equivalent use case whereby we have multiple exception paths, as can be seen in the long snippet in stackoverflow.com/a/315967/632951 . If you are going to weigh the "catch-all" — } catch(e) { /* handle all */ } , then you must weigh it against the two-state errorcode 0 and 1 which doesn't use switch.
1d
comment Why have many programmers moved to using exception handling for input or output?
.............................. answer only when the reasoning is flawed, not just because it happens to be on the minority side (goodness -15 votes?) of a religious flame-topic.
1d
comment Why have many programmers moved to using exception handling for input or output?
@AK_, While that's irrelevant, I really doubt he'll not stand behind it today. His post on AMA shows I'm on the right track. Also, the links I've posted provides strong reasoning that exception-based code has many pitfalls. If you've skipped through all of them, you can start from Raymond Chen's reasoned blogpost 6 paragraphs before "it is extraordinarily difficult to see the difference between bad exception-based code and not-bad exception-based code". I'll delete the ...........................................
1d
revised Why have many programmers moved to using exception handling for input or output?
added 529 characters in body
1d
comment Why have many programmers moved to using exception handling for input or output?
@DougM, The phrase "easier way" would be appropriate then. Whether that's a good or bad thing is irrelevant and will depend on each use case, as the question here is simply "Why have many programmers moved to using exception handling for input or output?" And the answer is because it's the economical choice. That decision has no direct relation with theoretical correctness nor faulty input/output. — Regarding the part on "more/less code", If you re-read through the links, it's evident Dijkstra's quote above is not saying that more code is a good thing, he's stating the exact opposite.
2d
revised Why have many programmers moved to using exception handling for input or output?
deleted 206 characters in body
2d
comment Why have many programmers moved to using exception handling for input or output?
@utnapistim, The question is comparing exception handling against the other alternatives. And yes they make things easier when there's no need for reliability yet it's the easy way out when you get to high-reliability situations. See the links I've provided, especially blogs.msdn.com/b/oldnewthing/archive/2005/01/14/352949.aspx and joelonsoftware.com/items/2003/10/13.html
2d
comment Why have many programmers moved to using exception handling for input or output?
@Aaronaught, While silent downvotes don't help the site, comments which explain nothing is just as non-useful. Why do you say that this is a troll answer?
2d
revised Why have many programmers moved to using exception handling for input or output?
edited body
2d
revised Why have many programmers moved to using exception handling for input or output?
added 55 characters in body
2d
answered Why have many programmers moved to using exception handling for input or output?
Apr
15
comment What is negative code?
Related: quora.com/How-many-lines-of-code-do-professional-program...
Apr
12
comment Why is jQuery released under MIT and not LGPL?
The question should be "Why is jQuery releasd under MIT and not CC0?"