-
Notifications
You must be signed in to change notification settings - Fork 3
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
Initial attempt at supporting collections of arbitrary types as keys #2
base: master
Are you sure you want to change the base?
Conversation
How about the following,
|
That would work, but it results in extra allocations in the string condition.
NOTE: Did a similar check for arrays and it's about the same between the two implementations. Maybe it would make sense to special case strings for now and make that the fallback? |
Seems reasonable |
- You can use Tuples as keys (which are pretty fast) - Better fallback `append_key` method w/ special cases for `String` and `Tuple`
To be clear |
Okay, I guess since julia doesn't enforce the iterator interface we could just not have a type requirement on the key. Do you have a minimal example of the type of iterators you're working with? |
I don't have a minimal example, because it is explicitly iterator. |
Okay, I don't really know how to make this work for arbitrary iterators easily because the supported constructor syntax seems to vary significantly by iterator. With the existing architecture we require that we can constructor the iterator type w/ 1) an empty constructor and 2) that splats the existing iterable with a new element. |
AbstractString
orVector{T}
.Trie
type and some of its constructors.Vector{Symbol}
andVector{UInt8}
keys.