I might be over-thinking this and I know I’m getting greedy here:
Is there an array type that is indexable, has only unique members, can not change in size or elements, and is relatively “small” (i.e. shorter than say 256)? The element type of this array will be String
.
I will need to refer to the elements in these arrays and think that using a Int
pointer might be cheaper than the actual String
it’s pointed at (correct me if I’m wrong). These array should not contain duplicate elements, and once created should not change in size, nor should their elements change.
- StaticArrays.jl and ImmutableArrays.jl is not unique.
-
Set
is not statically sized nor is it indexable.
I can solve all of this with some checks and controls. For instance:
using StaticArrays
v(x::Vector{String}) = SVector(unique(x)...)
but it would be neat if this was baked into the type itself… Any ideas?