-
Notifications
You must be signed in to change notification settings - Fork 375
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
Usage of unsafe
#802
Comments
I'm still interested in the discussion around |
I've not personally had any discussion re: unsafe, but to me there's strong reasons to not include it as it would be hard to have For the specific case of float64 bits, I think it makes sense to implement these four as native functions in the math package. For most things, I don't necessarily see the point in adding unsafe - even for a |
A minimal attack surface is definitely ideal. Honestly I did not realize how much unsafe is being used in Go. I think my current thought is that it would be easier to fork Go code if Gno has an |
I've started porting some needed Go code (
math.Sin
,math.Cos
) to Gno and I'm noticing that I'm running into small roadblocks with packages that useunsafe
. Isunsafe
out of scope for Gno? It is okay if so, it seems like this is not imported anywhere in.gno
files... I'm curious the reason (for determinism? preventing memory access?) The removal ofunsafe
does seem to throw wrenches in simple things, like an implementation ofmath.Sin
, where the stdlib implementation uses it to retrieve IEEE 754 binaries of floats. I'm sure I can workaround them for my purposes, I was just wondering about the context.The text was updated successfully, but these errors were encountered: