Re: [rust-dev] Generic enums : manually implementing Clone trait

2014-04-21 Thread Léo Testard
Le 21 avr. 2014 à 12:57, Artella Coding artella.cod...@googlemail.com a écrit : Suppose I have the enum : enum CollT { A(f64,T), B(f64,T) } I know that the compiler can automatically derive the Clone trait for the above. However I would like to manually implement it and

Re: [rust-dev] Goto statement missing

2014-03-23 Thread Léo Testard
Hello Gotos are considered harmful for a reason. They allow you to bypass every static block scope rules. Rust is a language with many static analysis concerning typing and scope rules. I don't think goto statements integrate well in such languages. On the other hand, I never felt gotos missing

Re: [rust-dev] Goto statement missing

2014-03-23 Thread Léo Testard
Kang Seonghoon some...@mearie.org To be exact, it is `'g: ...` and `break 'g;` respectively. Its resemblance with the lifetime syntax is no coincidence. Woops, indeed, sorry for the mistake. There's no syntax highlighting when wirting code in emails, and I'm not very used to this new syntax.

Re: [rust-dev] Let’s avoid having both foo() and foo_opt()

2013-12-22 Thread Léo Testard
Hello, Le 22 déc. 2013 à 18:59, Stefan Plantikow stefan.planti...@gmail.com a écrit : Hi, Am 22.12.2013 um 16:47 schrieb Gábor Lehel glaebho...@gmail.com: This is a nice idea. At first I thought it wouldn’t work with `if` but in expressions `if` requires `else` so the grammar wouldn’t

Re: [rust-dev] rustc abi

2013-12-18 Thread Léo Testard
Hello Philip, Le 18 déc. 2013 à 16:41, Philip Herron redbr...@gcc.gnu.org a écrit : Hey all Been writing more rust to learn more. And i have been attempting to write python bindings to rust. And for example if i create a function in rust: pub fn spam () { ... } the symbol gets

[rust-dev] Separated/Incremential compilation

2013-11-29 Thread Léo Testard
Hello, I think everyone here will agree to say that compilation times in Rust are problematic. Recently, there was an argument on IRC about reducing compilation times by reducing the use of GC and failures. Although I agree it's good to reduce Rustc's overhead, I think there are more important

Re: [rust-dev] Interest in OptionStr?

2013-11-12 Thread Léo Testard
Hello Sorry for the mail being sent off-list. Here's what I suggested in case it helps somebody else: match opt_err { None = format!(compilation failed at offset {:u}, 0u), Some(ref s) = format!(compilation failed at offset {:u}: {:s}, 0u, s.as_slice()) }; Le 12 nov.