News for hackers. Stuff that matters.
Re:Why I haven't given up on C++ by masklinn on Monday February 15, 2016 @05:35AM (#11102602)
> The second one could only arise with unsafe pointers in Rust, as safe code uses slices, combining the base pointer and the element count in a single value.

OTOH the point here is to pass a preallocated but "uninitialised" buffer to the callee, which Rust wouldn't allow with slices, unless you created a slice from a raw allocation (I don't know if that's defined behaviour, though I guess you could do that safely by passing in a Write rather than the slice itself, but then you're Write-ing to a slice which has… interesting behaviour)

There are no comments on this comment yet.