-
Notifications
You must be signed in to change notification settings - Fork 116
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
Consider removing the Lua
prefix from types/traits
#15
Comments
While we're at it, the trait I have to implement to make something a userdata object is named |
Personally, I think it's fine to name things somewhat generically in Rust since they are namespaced (e.g You shouldn't really be doing |
PR has been merged, so I'm going to mark this issue as fixed. I added a 'prelude' module for glob imports, but I don't know whether it's "really" worth it or not, I guess it's something to consider before a hypothetical 1.0 release. I will use the prelude module though, so it's worth it for me at least. |
The
rlua
crate is already a namespace for the contents, so they don't need a prefix for disambiguation. Removing the prefix would allow writing shorter and slightly clearer code in my opinion.Downside:
use rlua::*;
imports too much (including aResult
type alias shadowing Rust's own result type). This can be mitigated somewhat by introducing aprelude
module like many libs do. It's also not clear to me if renaming theLuaString
type toString
is a good idea.(also,
LightUserData
is the only type that's not prefixed)The text was updated successfully, but these errors were encountered: