Does this API make sense? Specifically, having two functions one of which accepts T by value and one of which accepts T by pointer. Since T is generic, it might be efficient to pass T by value or it might be more efficient to pass it by pointer, depending on @sizeOf(T). Or is there some magic optimization that makes setPtr unnecessary?
pub fn set(many_ptr: @This(), index: usize, value: T) void {
many_ptr.backing[index] = value;
}
pub fn setPtr(many_ptr: @This(), index: usize, value_ptr: *const T) void {
many_ptr.backing[index] = value_ptr.*,
}