-
Notifications
You must be signed in to change notification settings - Fork 9
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
A function that returns the right constructor given a max length #20
Comments
This is very readable, why do you want to shorten it? I would add a function that returns a type stable function, so the type stabe version can be run. |
Instead of having |
Cute. I still want a function form. |
definitely cute. |
agreed |
Yes, it should also have a simple constructor, like the |
I can easily do a version that picks one of the UInt*s used in ShortStrings, but I think you should have the ability to pick your own (possibly larger, or possibly not a power of 2 size, such as a UInt24 or UInt48). I think to handle that, what is needed is a function that, given a vector or tuple of Unsigned types, returns the smallest one that can contain the given maxlen. |
Fix #20, adds constructor given just maximum length
I would like a way to simplify this code.
or even the more complex version that support missings:
I am not sure what the best solution is.
The text was updated successfully, but these errors were encountered: