Skip to content
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

Namespace #271

Closed
giann opened this issue Mar 11, 2024 · 0 comments
Closed

Namespace #271

giann opened this issue Mar 11, 2024 · 0 comments
Labels
language Issue related to the language proposal Something we consider doing
Milestone

Comments

@giann
Copy link
Collaborator

giann commented Mar 11, 2024

mylib.buzz

namespace mylib;

export fun hello() { ... };

main.buzz

import mylib;

| ...

mylib.hello();

or rename imported namespace

import mylib as hislib;

|...

hislib.hello();

or erase imported namespace

import mylib as _;

| ...

hello();
@giann giann added language Issue related to the language proposal Something we consider doing labels Mar 11, 2024
@giann giann added this to the 0.4.0 milestone Mar 11, 2024
giann added a commit that referenced this issue Mar 11, 2024
- A script exporting at least one symbol, must specify its namespace at the start of the script
- When importing, the namespace can be changed with `as`
- A `_` import namespace will erase the imported symbols namespace

closes #271
giann added a commit that referenced this issue Mar 11, 2024
- A script exporting at least one symbol, must specify its namespace at the start of the script
- When importing, the namespace can be changed with `as`
- A `_` import namespace will erase the imported symbols namespace

closes #271
giann added a commit that referenced this issue Mar 11, 2024
- A script exporting at least one symbol, must specify its namespace at the start of the script
- When importing, the namespace can be changed with `as`
- A `_` import namespace will erase the imported symbols namespace

closes #271
giann added a commit that referenced this issue Mar 11, 2024
- A script exporting at least one symbol, must specify its namespace at the start of the script
- When importing, the namespace can be changed with `as`
- A `_` import namespace will erase the imported symbols namespace

closes #271
giann added a commit that referenced this issue Mar 12, 2024
- A script exporting at least one symbol, must specify its namespace at the start of the script
- When importing, the namespace can be changed with `as`
- A `_` import namespace will erase the imported symbols namespace

closes #271
@giann giann closed this as completed in 852760d Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Issue related to the language proposal Something we consider doing
Projects
None yet
Development

No branches or pull requests

1 participant