tisonkun commented on issue #22:
URL:
https://github.com/apache/datasketches-rust/issues/22#issuecomment-3663161598
> If it is strictly an internal name, it should't be an issue. (I'm not used
to reading Rust, my issue!)
>
> Historically in Java over the years we had inadvertently created public
name conflicts across some of the sketches. If you are using only one sketch it
is not an issue, but if you wanted to use two sketches in the same class that
happened to have public name conflicts, one of the sketches had to be fully
qualified on every use, P.I.T.A. :)
I know this issue. It happened when I developed Apache Flink, and we started
to fight with Hadoop's `FileSystem` and so many other `FileSystem`s. IIRC,
there are some other things like communicating between the shaded names and the
original names. (My Rust code percentage goes over the Java part starting from
this year, lol.)
On Scala, Rust, etc., the language allows you to partially import the module
name, so even if you have:
```rust
pub mod hll { pub struct Sketch }
pub mod kll { pub struct Sketch }
```
It's possible to do:
```rust
use datasketches::hll;
use datasketches::kll;
// use hll::Sketch ...
// use kll::Sketch ...
```
But anyway our exported names are `HllSketch` already.
The remaining issue can be some developers could complain similar file names
can make searching code in IDE a bit harder (consider all your results are
`mod.rs`/`lib.rs`/`sketch.rs` so you need extra prefix qualifier to know who it
excatly is). But this is something about internal dev experience. Also
`hll/hll.rs` would cause
[`clippy::module_inception`](https://rust-lang.github.io/rust-clippy/master/index.html#module_inception).
Naming is hard 🤷🏻♂️
N.B. This issue can be closed as not an issue, IMO.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]