Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

13
What are some rules of thumb for 'use'?
Post Body

So, 'use' is pretty flexible. Which is nice. But it also bothers me when it isn't apparent how to use any feature of a language in an obvious, consistent way. Also, 'use' boilerplate at the top of my files is actually a fairly significant percentage of my code!

When do you do only 'use' the top level module? When do you 'use' the module one level above the symbol you need? When do you 'use' specific symbol(s)? When do you wildcard ('*') use? When building a library, when do you just 'pub use' the submodule vs. reexport some or all the symbols?

There are so many choices.

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
5,214
Link Karma
323
Comment Karma
4,871
Profile updated: 5 days ago
Posts updated: 3 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
7 years ago