Re: [rust-dev] Man or boy?

2013-12-24 Thread comex
On Tue, Dec 24, 2013 at 8:17 PM, Vadim wrote: > I'm again pretty nervous about this, because this is one of the > much-maligned features of C++ references. > > > Why is it maligned, though? I malign it mainly because it allows (and encourages) confusing code that looks like it's calling a functio

Re: [rust-dev] Man or boy?

2013-12-24 Thread Vadim
Right off the bat, I would say that would be prettier if we had argument auto-borrowing I'm again pretty nervous about this, because this is one of the much-maligned features of C++ references. *Why* is it maligned, though? and if closure assignment was in scope to be captured inside the clo

Re: [rust-dev] Man or boy?

2013-12-24 Thread Patrick Walton
On 12/24/13 2:42 PM, Vadim wrote: type T<'s> = 's || -> int; fn man_or_boy(k:int) -> int { fn A(k:int, x1:&T, x2:&T, x3:&T, x4:&T, x5:&T) -> int { let mut k = k; let mut B: T = || {fail!()}; B = || { k -= 1; A(k, &B, x1, x2, x3, x4)

Re: [rust-dev] Man or boy?

2013-12-24 Thread Patrick Walton
On 12/24/13 2:42 PM, Vadim wrote: Hi, For a bit of holiday fun, I want to present a Rust implementation of Knuth's man-or-boy compiler test. Can this be improved? Here's how it looks in other languages.

[rust-dev] Man or boy?

2013-12-24 Thread Vadim
Hi, For a bit of holiday fun, I want to present a Rust implementation of Knuth's man-or-boy compiler test. Can this be improved? Here'show it looks in other languages. Right off the bat, I would say that w