Skip to content
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

[proposed] SF topic: Rust Idioms #19

Open
alsonkemp opened this issue Apr 21, 2016 · 0 comments
Open

[proposed] SF topic: Rust Idioms #19

alsonkemp opened this issue Apr 21, 2016 · 0 comments

Comments

@alsonkemp
Copy link

Ruby/Rails has a strong notion of idiomatic code and that was very helpful. Python has the notion of pythonic. What are Rust's idioms?

I'm writing a hobby project in Rust and I'm swirling over basic data modeling and function signature questions. Examples:

  • Immutability is good, so "mut" should be avoided-ish, right?, so why is it everywhere?
  • How do I think about "mut"?
  • Rust has a fairly unique blend of ownership and im/mutability, and that threads through code, so how do I think about and model that?
  • How do I organize a reasonably complicated project between /src/bin/, /src/lib.rs, /src/x/mod.rs, etc?
  • I'm having difficulty navigating documentation to figure out which exports are exported where by which module... What? e.g. why does hyper re-export client::Client as Client? How do I know this from the docs?
  • How do I model multi-dimensional data structures (e.g. lines, planes, volumes)? (I've looked at existing modules for examples but am still not comfortable.)

My modest, though fripperous, project is struggling with these issues so I'd love to hear a discussion around these questions. They might be covered elsewhere but I've not been able to find answers.

If this topic sounds interesting, I'd be happy to lead a group/panel discussion on the topic and to use my project to ground the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant