10 votesstarted · Adminfsharporg-lang (F# Software Foundation Language Group, F# Software Foundation) responded
I’m marking this as “approved” for F# 4.0+.
A pull request for this feature has been submitted here:
Don, F# Language DesignFrank Niemeyer commented
@Sebastian: The only thing that F# is missing for this is the "fixed" statement (you'd have to pin the byte by allocating a GCHandle). The dereferencing (i.e. copy the contents of the byte array to a struct of type T) can achieved today using p |> NativePtr.toNativeInt |> NativePtr.ofNativeInt<'T> |> NativePtr.read.