Re: [rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-29 Thread Graydon Hoare
On 13-04-27 08:49 AM, Lee Braiden wrote: Hi all, This is going to be long, but I've tried to organise my thoughts clearly and as succinctly as possible. I've read your email a few times and I _think_ it mostly consists of a request to add catchable exceptions to the language. Which we won't

Re: [rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-29 Thread Lee Braiden
Hi Graydon, On 29/04/13 19:26, Graydon Hoare wrote: I've read your email a few times and I _think_ it mostly consists of a request to add catchable exceptions to the language. Which we won't do (or I won't do, and I will resist strongly as I think it will hurt users, performance and

Re: [rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-29 Thread Gábor Lehel
On Sat, Apr 27, 2013 at 8:50 PM, Patrick Walton pwal...@mozilla.com wrote: Perhaps we could introduce a form which is like spawn a task to catch an exception from a data sharing view (i.e. it takes an ~fn and can't close over any `@` data) but is optimized to just call the closure and trap

Re: [rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-29 Thread Nathan Myers
On 04/29/2013 11:26 AM, Graydon Hoare wrote: On 13-04-27 08:49 AM, Lee Braiden wrote: Hi all, This is going to be long, but I've tried to organise my thoughts clearly and as succinctly as possible. I've read your email a few times and I _think_ it mostly consists of a request to add catchable

[rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-27 Thread Lee Braiden
Hi all, This is going to be long, but I've tried to organise my thoughts clearly and as succinctly as possible. On 26/04/13 18:06, Patrick Walton wrote: So here are my ideas. They are very worse-is-better at this point. * Failing to perform a basic I/O operation should result in a call to

Re: [rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-27 Thread Patrick Walton
On 4/27/13 8:49 AM, Lee Braiden wrote: This would be a relatively ugly approach, to my way of thinking. Why should a dead stream be returned at all, if the code to create it failed? Why should I be able to call write() on something that could not be created? Two reasons: 1. If `open`

Re: [rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-27 Thread Lee Braiden
On 27/04/13 18:51, Patrick Walton wrote: On 4/27/13 8:49 AM, Lee Braiden wrote: This would be a relatively ugly approach, to my way of thinking. Why should a dead stream be returned at all, if the code to create it failed? Why should I be able to call write() on something that could not be

Re: [rust-dev] Simpler/more flexible condition handling was: Re: Update on I/O progress

2013-04-27 Thread Patrick Walton
On 4/27/13 11:36 AM, Lee Braiden wrote: On 27/04/13 18:51, Patrick Walton wrote: On 4/27/13 8:49 AM, Lee Braiden wrote: This would be a relatively ugly approach, to my way of thinking. Why should a dead stream be returned at all, if the code to create it failed? Why should I be able to call