On Apr 2, 2014, at 2:08 PM, Simon Sapin <[email protected]> wrote:
> On 02/04/2014 18:43, Corey Richardson wrote: >> On Wed, Apr 2, 2014 at 1:34 PM, Steve Klabnik <[email protected]> wrote: >>> I compiled from source just yesterday, but everything's been going >>> swimmingly! >>> >>> I just have one comment on 0.10: It seems like println was removed >>> from the prelude. While I can totally appreciate that most people will >>> use println!, which is automatically use-able, it _is_ making my >>> 'hello world' examples significantly more complex, since basically >>> every one of them needs to either import println or use println!("{}", >>> foo); >>> >>> I'm not sure if this is a good or bad thing, just wanted to raise that >>> as a possible issue. >>> >> >> It has been raised, as an extension to the macro, that invocation with >> a single, non-string literal, could expand into `println!("{}", >> $that_arg)` rather than requiring the `"{}"`. > > This sounds even better than having both println() and println!() (in the > prelude) with non-obvious differences. This was discussed a while ago. I am very strongly opposed to this change. The primary reason being that println!("hello world"); and let s = "hello world"; println!(s); should have the same semantics. I don't believe we have any precedence right now for a semantic behavior change when using an identifier in place of an expression. Similarly, println!("hello world"); and println!("hello " + "world"); should behave the same. As with the previous, I don't believe we have any precedence for a semantic behavior change when replacing a constant string with a non-constant expression. -Kevin Ballard _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
