-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[superseded] new pointers.toUncheckedArray #15500
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
Conversation
3c1875f
to
32289fa
Compare
Documentation needs a warning that is unsafe, |
This is going in the right direction but |
your assumption is too restrictive, |
32289fa
to
1be5271
Compare
1be5271
to
8ee5d18
Compare
PTAL |
This is a new |
How is that any different from fusion? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What Araq said. Additions to the stdlib should be well thought through, discussed and hopefully tested ahead of time as a Nimble package
=> nim-lang/fusion#20 I'll close this PR if the fusion one gets merged |
alternative to #15490
adds
toUncheckedArray
it provides a safer and more readable construct than the explicit cast (which is error prone since the cast will happily accept any type without giving any compiler error, eg in case of
let px = cast[ptr UncheckedArray[int]](pointerToInt8)