rust-lang-ja / ac-library-rs

ac-library-rs is a rust port of AtCoder Library (ACL).
Creative Commons Zero v1.0 Universal
225 stars 27 forks source link

Add internal modules into lib.rs and fix visibility #6

Closed kenkoooo closed 4 years ago

kenkoooo commented 4 years ago

Add internal_*** modules into lib.rs and fix the visibility of modules like the following:

koba-e964 commented 4 years ago

I prefer exposing functions/structs directly in like ac_library_rs::FenwickTree by re-exporting in lib.rs https://github.com/rust-lang-ja/ac-library-rs/blob/5809126cdbb8dcd3a632e5f114aa81202ef9d44c/src/lib.rs#L14 to ac_library_rs::fenwick_tree::FenwickTree. That's because ACL adopts the same policy. (using namespace atcoder; imports everything.)

I'd like to hear what other contributors think.

qryxip commented 4 years ago

As a compromise, we have an another option to add src/prelude.rs.

That adapts to the policy of original ACL, I think. (as it is intended to be used with using namespace atcoder;)

pub use crate::fenwicktree::FenwickTree; 
qryxip commented 4 years ago

We also have to take into consideration that this crate will be unlikely introduced to the system of AtCoder.

https://twitter.com/chokudai/status/1303025509488496645

The users have to expand the code with some tool. (e.g. hatoo/cargo-snippet, shino16/cargo-auto-bundle, qryxip/cargo-equip)

kenkoooo commented 4 years ago

Thanks. That makes sense to me. Let me make pub mods private.

qryxip commented 4 years ago

let us merge.