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

Remove convert for biosequences #321

Open
jakobnissen opened this issue Oct 23, 2024 · 2 comments
Open

Remove convert for biosequences #321

jakobnissen opened this issue Oct 23, 2024 · 2 comments
Labels

Comments

@jakobnissen
Copy link
Member

IMO, convert should not exist for mutable types (i.e. types with object identity), because it can be called implicitly, which can lead to very weird stuff:

julia> x = dna"TAG";

julia> y = [bioseq("TAG")];

julia> push!(y, x);

julia> y[2] === x
false
@kescobo
Copy link
Member

kescobo commented Oct 23, 2024

I saw the slack gripe on this. Doesn't feel like a huge loss, especially if we put in constructors that can do the conversion for us (eg it would be nice to be able to "convert" RNA to DNA, but it could just be with a dna sequence constructor)

@jakobnissen
Copy link
Member Author

Yep, the idea is to use the constructor instead. For immutable types (say, biosymbols) we can keep the conversion.

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