Modifying immutables is annoying. In many cases, one needs to operate on objects with well-defined heap addresses. My current approach is to simply extract the pointer, and pass it to my mutating function. Say, e.g., I have a `vec = Vector{somestruct{N}}`

, and `somestruct`

contains an N-tuple that needs to be changed; then my code has `some_function!(Ptr{somestruct{N}})`

and gets used by `some_function!(pointer(vec,i))`

. I wanted to ask:

- Is the recommended way of going about it?
- Is any of the related juleps https://github.com/JuliaLang/julia/issues/17115 https://github.com/JuliaLang/julia/issues/11902 https://github.com/JuliaLang/julia/pull/21912 planned for inclusion in 0.7 / 1.0.
- Is there a description somewhere of what I need to think about in order to be 0.7 compatible, with respect to tbaa?

For example, sorting a tuple is a pain (without allocations). Luckily, I can simply call the factory-provided insertion `sort!`

by wrapping a pointer to the tuple into a thin array.

edit: Thin array means e.g.

```
struct ptrArray{N,T}<:AbstractVector{T}
ptr::Ptr{T}
end
ptrArray(ptr::Ptr{NTuple{N,T}}) where {N,T} = ptrArray{N,T}(convert(Ptr{T}, ptr))
Base.length(x::ptrArray{N,T}) where {N,T} =N
Base.size(x::ptrArray{N,T}) where {N,T} =(N,)
Base.getindex(x::ptrArray,i) = unsafe_load(x.ptr,i)
Base.setindex!(x::ptrArray,v,i) = unsafe_store!(x.ptr,v,i)
Base.IndexStyle(::ptrArray) = Base.IndexLinear()
```