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

[speculative] Remove BioSequence(::Integer)? #142

Closed
jakobnissen opened this issue Mar 11, 2021 · 0 comments
Closed

[speculative] Remove BioSequence(::Integer)? #142

jakobnissen opened this issue Mar 11, 2021 · 0 comments
Milestone

Comments

@jakobnissen
Copy link
Member

Right now you can do

julia> LongDNASeq(10)
10nt DNA Sequence:
CA--------

This strikes me as weak typing. In fact, we have not constructed a sequence from 10. Imagine a situation where you mistakenly thing x is something sequence-like, such as a bioseq or a string, but really, it's an integer. Doing LongDNASeq(x) then works - and give the wrong result.

I propose instead we change it to LongDNASeq(undef, 10), similar to arrays.

@jakobnissen jakobnissen added this to the v3.0.0 milestone Mar 11, 2021
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

No branches or pull requests

1 participant