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

Support ad hoc function and type submodule declarations #1513

Open
lerno opened this issue Oct 3, 2024 · 2 comments
Open

Support ad hoc function and type submodule declarations #1513

lerno opened this issue Oct 3, 2024 · 2 comments
Labels
Enhancement Request New feature or request

Comments

@lerno
Copy link
Collaborator

lerno commented Oct 3, 2024

Possible syntax

module std::foo;
// Creates a sub module std::foo::bar in which hello() is placed.
fn void bar::hello() 
{
  ...
}
@lerno lerno added the Enhancement Request New feature or request label Oct 3, 2024
@Caleb-o
Copy link
Sponsor Contributor

Caleb-o commented Oct 4, 2024

Assuming this only allows a single level of depth? So you can do bar::hello() but maybe not bar::baz::hello()?

@lerno
Copy link
Collaborator Author

lerno commented Oct 4, 2024

Exactly, it will be limited to single level for readability and also implementation should be more straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants