Use of `pointer`

I am rather nervous that deprecating pointers would make some useful things impossible to do in Julia, even in principle. I’m working on something lately where I need to be able to reinterpret data from a Vector{UInt8} as another data type on demand. It seems that if I were to actually do this with reinterpret, I would have to allocate an array twice: once to copy a subset of the Vector{UInt8} and again to reinterpret it. With pointers and copy these can basically both be done in the same step. There are some other similar, subtle things that one might need to do especially in I/O applications that seem very difficult to do efficiently without pointers.

I apologize that this has nothing to do with this thread. At some point I’m going to open a new thread about whether I can achieve these things without pointers.

1 Like