-
Notifications
You must be signed in to change notification settings - Fork 41
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
Relude_Unsafe shadows our projects Unsafe module which has more stuff in it. #271
Comments
This is basically the problem with a global I'll leave this open for more comments, but I'm inclined to close it. |
@erlandsona you could wrap
And then include that file instead of |
^^ That seems like an excellent guide for us to add to the docs. In this specific case, I'm not 100% opposed to removing |
Yeah, @johnhaley81's suggestion seems great. I didn't know you could do that, but that seems like a good workaround. |
In any case, I'm glad I asked because I'm probably gonna go down the route @johnhaley81's suggesting! @mlms13 glad you're still alive! Haha |
Thanks for asking, I learned something too! |
Feel free to close this if you feel so inclined 👌 |
IMO it would be better to have "unsafe" prefix in function names. I don't think grouping functions by "unsafety" in a module makes a lot of sense. On the other hand, 1 function is not enough to make any strong judgment :) |
Consider removing Relude_Unsafe from Relude.Globals to avoid shadowing in the event developers want to define their own Unsafe module for externals to js functions that can throw RTE's. We could rename ours to like
Risky.re
or something but convention for fn's that can throw is to prefix them with Unsafe so I'd prefer if we could define our own unsafe module but stillopen Relude.Globals
at the top of files. Generally I'm fine with qualifyingRelude.Unsafe.coerce
for the few times we need that function. Alternatively expose coerce at the top-level of Relude.Globals like composition>>
?The text was updated successfully, but these errors were encountered: