Proposal: Extensible exceptions
Henning Thielemann
lemming at henning-thielemann.de
Fri Jul 18 20:00:49 EDT 2008
On Fri, 18 Jul 2008, Brandon S. Allbery KF8NH wrote:
> On 2008 Jul 18, at 11:05, Ian Lynagh wrote:
>
>> On Thu, Jul 17, 2008 at 09:16:36AM -0400, Isaac Dupree wrote:
>>>
>>> I'm not entirely happy with this particular sketch of a proposal, but do
>>> people think that my initial issue is something to be concerned about at
>>> all? (I'd be glad to be disproved :-)
>>
>> It's hard to say if it'll be a problem in practice - we don't have any
>> experience with writing exception hierarchies.
>
> I'm going to ask a possibly silly question: has anyone thought about this
> vis-a-vis Simon's proposal of a new signals API? It's not that unusual for
> signals (usually SIGUSR1/SIGUSR2, often SIGINT, SIGHUP, sometimes SIGABRT,
> SIGQUIT) to be used as asynchronous triggers --- which might be best
> represented in the "Haskell world" as special exceptions. Likewise, it often
> makes sense to treat SIGPIPE, SIGHUP, SIGINT as exceptions instead of
> signals.
I have seen this solution in Modula-3 (like exception ThreadAlerted), but
I'm not happy with it, since the occurence of a signal is not specific to
the IO action you call (like CouldNotOpenFile to 'open'). I would use a
separate mechanism for signal handling.
More information about the Libraries
mailing list