-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rename log_err to print #1087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I was about to do this (well, I wanted to use |
Yeah, I was hoping we could make the logging output prettier too: #1088 |
Regardless of the approach we take, it would be nice for the sake of hello world for printing to be simple. both log_err and io::stdout().write_line(...) are hideous. We could also create a print() function and put it directly in std, so users could import std::*; print("hello, world"). But seeing as how log is supposed to be so highly integrated into the language, I do kind of think we should be encouraging log. That said, echo might be a better keyword for logging, so we can reserve print for std. |
I recently added |
|
How about |
I like |
I associate "alert" with "Alert dialog box" which is an immediate in-your-face action. IMHO printing to STDERR is a different form of notification. |
+1 for alert. |
graydon popped up on the mailing list recently to vote for log levels and prelude-defined constants (err, warn, info, debug) |
Phew! Finished this today after an embarrassing run of snapshots and partial-rewrites. The new scheme is this:
The macros
and similar depending on the macro you use. So you should wind up writing shorter and pithier logging bits using this, since you get #fmt thrown in for free. Just use There remains some vestigial bad-word support for the words "log_err" and "log_full" in the last snapshots; those will roll over with the next snapshot and vanish but in the meantime the stage1..3 compilers no longer even know about those words. Hopefully this is ok! |
Awesome! |
* update unwind documentation Co-authored-by: Adrian Palacios <[email protected]>
log_err is the most common way to get console output, and is usually used in a way that doesn't reflect it's name. For convenience and to make a better impression for 0.1 we should just rename it to 'print'.
The text was updated successfully, but these errors were encountered: