On Sat Oct 29 09:55:13 2011, Peter Hull wrote:
> On Fri, Oct 28, 2011 at 11:25 PM, David Rajchenbach-Teller
> <[email protected]> wrote:
>> As a newbie, I confirm that both "tag" and "log_err" are quite
>> confusing.
>>
>> I confirm that "print" will be much better.
> I disagree. I would expect print to be something that writes to
> stdout. As I understand it, log is a specialised debug/trace facility
> which is built-in and configurable. For example if you write log
> "hello world" it won't print anything unless RUST_LOG is set. I don't
> think it would be too mind blowing to introduce std::io::stdout() in
> the Hello World program.

Why not a "print" that (unconditionally) prints to stdout?

>> If you want something shorter than "variant", here are a few, well,
>> variants:
> I would have gone for union, for exactly the same reasons as Sebastian Sylvan.

Between "enum" and "union", I tend to favor "enum", for a simple 
reason:
- attempting to use a variant as a C-style or Java-style enum will work 
flawlessly;
- by opposition, attempting to use a variant as a C-style union will 
fail for reasons that will be very unclear for C programmers.

Cheers,
 David
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to