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

Hide inner constructors of objects in this package #318

Open
jakobnissen opened this issue Oct 21, 2024 · 1 comment
Open

Hide inner constructors of objects in this package #318

jakobnissen opened this issue Oct 21, 2024 · 1 comment
Labels

Comments

@jakobnissen
Copy link
Member

Right now you can do:

julia> LongDNA{4}(UInt[1], UInt(1))
1nt DNA Sequence:
A

This is not great, since it exposes the data layout of these objects to the user, and this is an implementation detail. For example, TwoBit.jl uses this.
make an Internal struct and use it for the inner constructor.

However, this is breaking as this is a method of an exported type.

@kescobo
Copy link
Member

kescobo commented Oct 21, 2024

Is this behavior documented? One could argue that it's not breaking if it's an internal representation and not documented, even if the method currently exists.

Then again, the fact that there's a package that uses it already is some argument against this.

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

No branches or pull requests

2 participants