Re: [rust-dev] sub-grammar for range pattern constants?

2013-04-29 Thread Erik S
On 4/29/2013 2:00 PM, Graydon Hoare wrote: Yes. Formalizing and completing the definition of the constant expression subgrammar would be extremely valuable. It's one of the major high-risk areas remaining the the design space. -Graydon VHDL is a very different language from Rust (it's a

[rust-dev] Proposal: Do block with multiple closures (was: Update on I/O progress)

2013-04-29 Thread Erik S
In thinking about how to handle I/O errors, I came up with a system that needed a do that could take multiple closures (and pass them to multiple trailing arguments). In thinking about it, this seems incredibly useful (for non-I/O things), and consistent with how Rust currently works. I propose

Re: [rust-dev] Division and modulo for signed numbers

2013-04-25 Thread Erik S
Comments inline. I'm glad to see integer division getting this level of attention. Erik On 4/25/2013 11:12 AM, Matthieu Monrocq wrote: Of course, having an infix syntax would make things easier: 5 % 3 vs 5 rem 3 vs

Re: [rust-dev] Division and modulo for signed numbers

2013-04-23 Thread Erik S
On 4/23/2013 9:02 AM, Patrick Walton wrote: On 4/23/13 7:48 AM, sw...@earthling.net wrote: Performance should be about the same when using F-division: * Performance will go up for division by constant powers of two. * Performance will stay the same for division by compile-time constants,

Re: [rust-dev] Division and modulo for signed numbers

2013-04-23 Thread Erik S
Thanks Graydon for the detailed reply to a newbie suggestion. It looks like I'm a little too late, this ship has already sailed. You're right that it's a topic reasonable people can disagree on. Adding Lint warnings seems like a poor workaround, but maybe the reduced confusion from C developers