Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upThe Zen of Rust #15264
Comments
huonw
added
the
A-docs
label
Jun 30, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
steveklabnik
Jun 30, 2014
Member
I find the whole "Zen of" thing to be a pretty terrible name, but we do have a style guide draft in the works that contains this information.
|
I find the whole "Zen of" thing to be a pretty terrible name, but we do have a style guide draft in the works that contains this information. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sinistersnare
Jun 30, 2014
Contributor
I disagree with @steveklabnik's comment, The Zen of Python accurately portrays the meaning of the work, and the poem is quite well structured in my opinion.
"The Zen of Rust" however might need a different name, but I agree, it would be nice to have a short manifesto of sorts regarding how Rustaceans write their code. The style guide is exactly what it says it is, a guide, not a short and sweet poem about the core values of Rust.
|
I disagree with @steveklabnik's comment, The Zen of Python accurately portrays the meaning of the work, and the poem is quite well structured in my opinion. "The Zen of Rust" however might need a different name, but I agree, it would be nice to have a short manifesto of sorts regarding how Rustaceans write their code. The style guide is exactly what it says it is, a guide, not a short and sweet poem about the core values of Rust. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nathantypanski
Jun 30, 2014
Contributor
If a "core values" statement happens, then I think the things as listed ("no magic, just code", "avoid unsafe code. failing that, encapsulate it") aren't really fundamental enough to rank among them. Or maybe it's just writing style - I think if we had a nice list, it was really beautifully written, and actually struck at the heart of why Rust is so awesome, then the community would jump on it.
Either way, I'd sooner wait until after the style guide comes about to start focusing on something like this. Even if they target different goals, a style guide can help expose the idioms that make Rust so great to work with.
|
If a "core values" statement happens, then I think the things as listed ("no magic, just code", "avoid unsafe code. failing that, encapsulate it") aren't really fundamental enough to rank among them. Or maybe it's just writing style - I think if we had a nice list, it was really beautifully written, and actually struck at the heart of why Rust is so awesome, then the community would jump on it. Either way, I'd sooner wait until after the style guide comes about to start focusing on something like this. Even if they target different goals, a style guide can help expose the idioms that make Rust so great to work with. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
llogiq
Jun 30, 2014
Contributor
@nathantypanski, this is not about a statement why Rust is so awesome. It should rather be a set of guidelines on what to pursue and what to avoid - both in implementing rust and implementing programs in rust. Also I'm open on a better name; I just shamelessly stole from Tim Peters' work which brought up the "Zen". I also don't believe it should necessarily be about style.
So what are the fundamental values?
|
@nathantypanski, this is not about a statement why Rust is so awesome. It should rather be a set of guidelines on what to pursue and what to avoid - both in implementing rust and implementing programs in rust. Also I'm open on a better name; I just shamelessly stole from Tim Peters' work which brought up the "Zen". I also don't believe it should necessarily be about style. So what are the fundamental values? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
aturon
Jun 30, 2014
Member
I think that @brson and @nikomatsakis have done some work toward a document like "The Rust Way", but I'm not sure what the status of the document is. The idea was not so much to lay out detailed coding guidelines as to spell out the core driving principles that make Rust different/interesting.
I've been working on a separate document that does spell out coding guidelines for Rust. You can see a draft here. These guidelines will be moving into the rust-lang github organization in the next week or two. I would greatly appreciate any PRs!
|
I think that @brson and @nikomatsakis have done some work toward a document like "The Rust Way", but I'm not sure what the status of the document is. The idea was not so much to lay out detailed coding guidelines as to spell out the core driving principles that make Rust different/interesting. I've been working on a separate document that does spell out coding guidelines for Rust. You can see a draft here. These guidelines will be moving into the rust-lang github organization in the next week or two. I would greatly appreciate any PRs! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
steveklabnik
Jul 30, 2014
Member
I don't want to encourage the weird cultural appropriation of "Zen of," and we also have a zillion FAQ documents and such that explain why Rust is built the way it is. I'm closing this in favour of the FAQ(s), and the coding guidelines.
|
I don't want to encourage the weird cultural appropriation of "Zen of," and we also have a zillion FAQ documents and such that explain why Rust is built the way it is. I'm closing this in favour of the FAQ(s), and the coding guidelines. |
steveklabnik
closed this
Jul 30, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
liigo
Jul 31, 2014
Contributor
+1
2014年7月31日 上午7:37于 "Steve Klabnik" notifications@github.com写道:
I don't want to encourage the weird cultural appropriation of "Zen of,"
and we also have a zillion FAQ documents and such that explain why Rust is
built the way it is. I'm closing this in favour of the FAQ(s), and the
coding guidelines.—
Reply to this email directly or view it on GitHub
#15264 (comment).
|
+1
|
llogiq commentedJun 30, 2014
Apart from our trifecta fast, safe, concurrent there is no manifesto (like e.g Tim Peters'. Zen of Python) that outlines the ideals that guide implementation and should also guide rustaceans while they develop applications.
Following Cunningham's law, here is a short and probably wrong Zen of Rust:
No magic, just code
Explicit is better than implicit (Thanks to Tim Peters)
Avoid unsafe code. Failing that, encapsulate it
Things that need not change shouldn't
Work with the type system
This isn't finished (TODO: Remove when no longer applicable)
Have fun!