Re: [rust-dev] trailing comma inconsistency between tuple-enum-variants and tuple-structs

2013-04-19 Thread Jack Moffitt
> I guess the comma should be allowed to be consistent with tuples and > vectors. +1 jack. ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] trailing comma inconsistency between tuple-enum-variants and tuple-structs

2013-04-19 Thread Brian Anderson
On 04/19/2013 11:57 AM, John Clements wrote: This program illustrates a small but irritating inconsistency between tuple-shaped enum variants and tuple-shaped structs: // trailing comma allowed here: struct F1(int,int,); struct F2(int,int); // trailing comma disallowed here: /*enum G1 { H1

[rust-dev] trailing comma inconsistency between tuple-enum-variants and tuple-structs

2013-04-19 Thread John Clements
This program illustrates a small but irritating inconsistency between tuple-shaped enum variants and tuple-shaped structs: // trailing comma allowed here: struct F1(int,int,); struct F2(int,int); // trailing comma disallowed here: /*enum G1 { H1(int,int,) }*/ enum G2 { H2(int,int) } I

Re: [rust-dev] Passing managed value to task

2013-04-19 Thread Erick Tryzelaar
Here's a demonstration using flatpipes: extern mod std; use std::flatpipes; fn main() { let (server_chan, server_port) = flatpipes::serial::pipe_stream(); do task::spawn { let val: @[int] = server_chan.recv(); io::println(fmt!("Value: %?", val)); } let value = @

Re: [rust-dev] Passing managed value to task

2013-04-19 Thread Patrick Walton
On 4/19/13 7:44 AM, Alexander Stavonin wrote: Do we have any possibility to do something like this or only owned values can be send? You can mark your data as serializable and use flatpipes. This gives you the ability to send managed values, at the cost of a copy on send. Essentially it's the

Re: [rust-dev] Passing managed value to task

2013-04-19 Thread Daniel Micay
On Fri, Apr 19, 2013 at 10:44 AM, Alexander Stavonin wrote: > Do we have any possibility to do something like this or only owned values > can be send? > > 11 fn task_with_shared_pointers() { > 12 let value = @[1, 2, 3, 4, 5]; > 13 let (server_chan, server_port) = stream(); > 14 > 15

Re: [rust-dev] Passing managed value to task

2013-04-19 Thread Graydon Hoare
On 13-04-19 07:44 AM, Alexander Stavonin wrote: Do we have any possibility to do something like this or only owned values can be send? Only owned values. -Graydon ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust

[rust-dev] Passing managed value to task

2013-04-19 Thread Alexander Stavonin
Do we have any possibility to do something like this or only owned values can be send? 11 fn task_with_shared_pointers() { 12 let value = @[1, 2, 3, 4, 5]; 13 let (server_chan, server_port) = stream(); 14 15 do task::spawn { 16 let val: @[uint] = server_chan.recv();

Re: [rust-dev] eliminate issue-2185.rs test?

2013-04-19 Thread Niko Matsakis
I think it's fine to remove this test, just because it's old and cruft and not hard to reproduce. *However* it should eventually be possible to implement the same interface for the same type multiple times with different type parameters, it's just that our current trait implementation has accidenta