Use macros for operations that just pass through, eg see the code in SaferIntegers.jl and many other libraries. But I guess you would need to do something more complex for the polar points.
Incidentally, it is more idiomatic to generalize with a parametric type, eg
struct CartesianPoint{T} <: AbstractPoint{T}
x::T
y::T
z::T
end
Use Mmap.mmap
and/or reinterpret
.
I am not sure what you want here.