-
Notifications
You must be signed in to change notification settings - Fork 123
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
Module with namespaces #152
Comments
There are no plans to change it from |
Doesn't seem to resolve collisions in a meaningful way, and it also makes things from namespaces look like regular identifiers, so you can't tell them apart. Makes code harder to read and to follow. Also leads to misleading errors: namespace foo
def derp():
return 10 import foo
def foo_derp():
return 200
print(foo_derp())
That's misleading because there are in fact NOT two definitions of I've just only now started looking at Lobster, so I could be missing something, but it seems to me this could end up leading some users chasing after a definition that doesn't exist, until they realized it's just their function colliding with some lib that they're importing, but the error doesn't make that immediately clear, and the syntax doesn't prevent it. |
Since this issue was originally posted, more people have mentioned their dislike for how namespaces use Another big question is if all the |
There's now a poll going on in the Lobster Discord on what namespacing should be like :) https://discord.gg/szJPYdX |
Is Lobster going to have modules with namespaces (lib.f), or prefixes (lib_f) are here to stay?
The text was updated successfully, but these errors were encountered: