On 29/10/2011 5:06 AM, David Rajchenbach-Teller wrote:
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
I agree. log_err was a kludge and I'd prefer to un-kludge it before
shipping rather than adding another keyword. Multiple log-levels is the
way to go. Macro if there's something relatively easy, or just keep
'log' as compiler-supported, but extend the syntax and include a bunch
of log-level
On 29/10/2011 1:34 PM, Brendan Eich wrote:
This seems like it will pay off for many, and rarely or never bite back. Have
to keep it small, of course.
Likely yes. Though we should offer a compiler flag / crate attribute to
disable the auto-import of it.
-Graydon
On 11/8/11 9:41 AM, Graydon Hoare wrote:
Likely yes. Though we should offer a compiler flag / crate attribute to
disable the auto-import of it.
In fact, we'll have to, in order to bootstrap.
Patrick
___
Rust-dev mailing list
Rust-dev@mozilla.org
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/8/11 6:41 PM, Patrick Walton wrote:
By the way, `alert` was suggested in a bug as a replacement for
log_err (and as a synonym for log(err, ...)), which Marijn and I
like. Has a cute JavaScripty feel to it.
+1 (although any self-respecting JS
Also relevant here: log_err was originally added as a stopgap
temporary solution, with the idea being that logging eventually would
be a more primitive operation where you specified both a log level
and a message, and there would be a macro that'd help you do this in a
more nice-looking way. We
On Fri, Oct 28, 2011 at 11:25 PM, David Rajchenbach-Teller
dtel...@mozilla.com 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
On Sat Oct 29 09:55:13 2011, Peter Hull wrote:
On Fri, Oct 28, 2011 at 11:25 PM, David Rajchenbach-Teller
dtel...@mozilla.com 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
On 10/29/2011 05:06 AM, David Rajchenbach-Teller wrote:
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
This seems like it will pay off for many, and rarely or never bite back. Have
to keep it small, of course.
/be
On Oct 29, 2011, at 10:11 AM, Marijn Haverbeke wrote:
but I suppose it can't be helped unless we really want to
have a std::pervasives module that's imported by default.
I've
On Sat, Oct 29, 2011 at 10:17 AM, Patrick Walton pwal...@mozilla.com wrote:
In my experience log_err is for quick and dirty printf debugging, so
stderr seems appropriate to me. It's not intended to be the main way for
command-line programs to get stuff on the screen. It's not ideal for that
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
As a newbie, I do not mind either way between importing std::io or
having the function baked in a Pervasives/Prelude module. However, I
concur that log is probably not the right tool for Hello world.
I also concur that names log/log_err do not
As a newbie, I do not mind either way between importing std::io or
having the function baked in a Pervasives/Prelude module. However, I
concur that log is probably not the right tool for Hello world.
Looks like it's decided. Filed a bug to get us a Pervasives module:
On Oct 28, 2011, at 3:25 PM, David Rajchenbach-Teller wrote:
As a newbie, I confirm that both tag and log_err are quite
confusing.
I confirm that print will be much better.
+1
If you want something shorter than variant, here are a few, well,
variants:
- sum
- cases
- choice
- tags
On Fri, Oct 28, 2011 at 3:25 PM, David Rajchenbach-Teller
dtel...@mozilla.com wrote:
If you want something shorter than variant, here are a few, well,
variants:
- sum
- cases
- choice
- tags (it's a plural)
- tagged
- enum (Java-style, not C++ style)
- family
- alt
- either
How about
15 matches
Mail list logo