[rust-dev] Confusion with regard to error handling

2012-03-19 Thread Daniel Farina
I have been reading Rust's introduction, and the one area where I feel pretty lost is with regard to the error handling. Consider a simple program like cat that opens, reads a file, writing it chunk-by-chunk to standard output. As we know, the syscalls for open, read, and write can all fail,

Re: [rust-dev] Confusion with regard to error handling

2012-03-19 Thread Masklinn
On 2012-03-19, at 18:28 , Graydon Hoare wrote: The longer answer is that we're familiar with the CL condition system as well as a number of alternatives, and need to spend some time exploring to find what fits the Rust semantics best. I spent quite a while sketching, prototyping and

Re: [rust-dev] Confusion with regard to error handling

2012-03-19 Thread Joe Groff
On Mon, Mar 19, 2012 at 3:59 AM, Daniel Farina dan...@fdr.io wrote: I think a good example of this is given in a chapter of Practical Common Lisp:  http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html CL's flavor of exception handling is probably the only

Re: [rust-dev] relax type checking of ints and uints?

2012-03-19 Thread Patrick Walton
On 3/19/12 6:56 PM, Tim Chevalier wrote: I don't think we have any plans to add implicit casts as implied by your other 4 examples. It seems too complex -- if any of the variables in your example were mutated after being initialized, the pass that would insert these casts would get pretty

Re: [rust-dev] relax type checking of ints and uints?

2012-03-19 Thread Graydon Hoare
On 12-03-19 07:00 PM, Patrick Walton wrote: On 3/19/12 6:56 PM, Tim Chevalier wrote: I don't think we have any plans to add implicit casts as implied by your other 4 examples. It seems too complex -- if any of the variables in your example were mutated after being initialized, the pass that

Re: [rust-dev] Compiling rust programs

2012-03-19 Thread Graydon Hoare
On 08/03/2012 2:48 PM, Jeff Schultz wrote: Yes, I appreciate the motive. Could the same goal be achieved by refusing to introspect a library that *doesn't* have a mangled name in any location where there are more than one instances of the library name or which can otherwise be deduced to be an