News for hackers. Stuff that matters.
Re:A Manifesto For Error Reporting by jerf on Tuesday March 05, 2013 @09:20AM (#5324568)
I'd expand on one of his points and observe that one of the core problems is that they are called exceptions, which prejudices the discourse in advance. They aren't exceptions. They are a way of declaring a handler that is scoped to receive certain types of objects on a second control plane (beyond normal control flow), which when invoked, destructively unwinds the stack until a matching handler is found or the program terminates due to falling off the top.

That is what they are. One of the things this mechanism is used for is exceptions, but that is a separate concept. It is possible that exceptions are generally a good idea, but that is the wrong mechanism to use for them (see, for instance, Lisp conditions & restarts for a good argument to that effect [1]). It is also possible that exceptions in general are a bad idea and it is better to use inline error codes rather than the separate control plane but that there is some other valid use for this second control plane (see all the non-exception uses of "exceptions", and note this is not hypothetical; see Python's StopIteration exception [2]).

Conflating the feature with the most popular use just leads to lots of confusing debates with people talking past each other.

[1]: http://www.gigamonkeys.com/book/beyond-exception-handling-co...

[2]: http://www.python.org/dev/peps/pep-0234/ , use Find to search for "It has been questioned" for a direct response to this issue

Re:A Manifesto For Error Reporting by RickHull on Tuesday March 05, 2013 @10:02AM (#5324781)
> I'd expand on one of his points and observe that one of the core problems is that they are called exceptions, which prejudices the discourse in advance. They aren't exceptions. They are a way of declaring a handler ...

I can't figure out what you're referring to with they. I am guessing wrapped exceptions, but also maybe the example where nil was passed to the constructor instead of a hash?

Re:A Manifesto For Error Reporting by jerf on Tuesday March 05, 2013 @11:34AM (#5325443)
Exceptions are called exceptions. But they really aren't. They're two concepts conflated together.
Re:A Manifesto For Error Reporting by RickHull on Tuesday March 05, 2013 @01:29PM (#5326338)
> Exceptions are called exceptions. But they really aren't. They're two concepts conflated together.

> They aren't exceptions. They are a way of declaring a handler ...

Hm, if that's the case, then you described the handling of exceptions, which is distinct from the declaration of the exceptional case as well as the act of throwing or raising the exception.

I feel like your comment unhelpfully adds mystique rather than clarifies. I may be holding you to an "unfair" standard though, based on your comment history, of which I am an enthusiastic fan.

Re:A Manifesto For Error Reporting by jerf on Tuesday March 05, 2013 @01:36PM (#5326386)
It's hard to say "exceptions aren't actually exceptions" without essentially being guilty of equivocation in advance. The important part of my message was where I broke it down in two pieces, neither of which I call exceptions in a desperate and apparently failed attempt to avoid further confusion. Sorry. There's the control flow construct, and there's the use of the control flow construct for handling certain types of errors, and the two get bundled together under one word in a way I think is misleading.