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

Added a prelude #162

Merged
merged 1 commit into from
Sep 16, 2017
Merged

Added a prelude #162

merged 1 commit into from
Sep 16, 2017

Conversation

Michael-F-Bryan
Copy link
Contributor

Closes #146

@Michael-F-Bryan
Copy link
Contributor Author

For the next major version, would it be a good idea to "flatten" rust-geo's public API? The way I see it, you only want access to the datatypes and the traits used to manipulate them. Therefore you could alter things so that the only things exported are the prelude module and types::*.

We'd still leave the algorithms module as it is on disk because the way it is currently structured allows nice separation between components. This would just rearrange how things are viewed by the user.

I'm imagining a top level lib.rs which looks like this:

mod traits;
mod types;
mod algorithm;

// re-exports to provide a more flattened API
pub use types::*;
pub mod prelude {
  ...
}

What are people's thoughts? This would technically be a breaking change (therefore you'd need to bump the major version) because people will have code which does use geo::algorithm::distance::Distance, but I feel like restructuring the public API like this will make it much flatter and simpler to deal with.

@frewsxcv
Copy link
Member

bors r+

thanks! opened a new issue for flattening the API: #163

bors bot added a commit that referenced this pull request Sep 16, 2017
162: Added a prelude r=frewsxcv a=Michael-F-Bryan

Closes #146
@bors
Copy link
Contributor

bors bot commented Sep 16, 2017

Build succeeded

@bors bors bot merged commit 7c73760 into georust:master Sep 16, 2017
@Michael-F-Bryan Michael-F-Bryan deleted the prelude branch September 16, 2017 22:53
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

Successfully merging this pull request may close these issues.

2 participants