BioJulia/BioSequences.jl

Default to dynamic allocation for string literals

jakobnissen opened this issue · 2 comments

Currently, dna"TAG" allocates at compile-time as documented in BioSequences. Perhaps it would be better for it to allocate at runtime by default? Now, the fast but unsafe behaviour is default and the safe but slow behaviour opt-in. Perhaps it should be the other way around.

When it comes to balancing two possibilities like this with pros and cons, I think we should err on the side of doing what base julia or the std library does. A lot of julia's niceness with types and methods comes in part from the community - packages and developers - being "well-behaved", so I'm hesitant to break a convention.

One can always make the argument that people using julia, should know and expect our literals to behave like base literals, in keeping with the language.

I agree. It's better to err on the side of Base. Closing this issue - if anyone in the future brings it up and make compelling arguments, we can always re-open it.