-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vector.Unboxed doesn't export constructors, but Unboxed.Mutable does #49
Comments
This stuff is wildly unsafe. One can easily construct invalid vectors and even circumvent memory safety.
Now we have ostensible 1000 element vector and any valid read from vector will read past end of actual array. Same applies to mutable vector though. I'm not opposed to exporing constuctors but I think they should come with disclaimer: "Very unsafe. Use at your own peril". Internal module maybe? |
we already export unsafeIndex and friends, i'm not sure if its much worse than that :) |
With exported constructors we lose memory safety even with safe operations
|
well, sure. thats why i'm totally ok with it being only exposed via a |
Constructors for unboxed vectors have been exported from |
I think they should both be exported (or at least I dont see any good reason not to export them)
The text was updated successfully, but these errors were encountered: