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

Is star in import syntax actually necessary for resolution? #35

Open
ncthbrt opened this issue Sep 20, 2024 · 2 comments
Open

Is star in import syntax actually necessary for resolution? #35

ncthbrt opened this issue Sep 20, 2024 · 2 comments
Milestone

Comments

@ncthbrt
Copy link

ncthbrt commented Sep 20, 2024

Since we're revising the import syntax to support both symbolic modules and files, I was wondering if we could look at the star syntax?

I've implemented module imports without needing the star, so I was wondering if there was some limitation of file imports that prevented us from omitting it?

@k2d222
Copy link
Contributor

k2d222 commented Sep 20, 2024

I was against the star import, but it was the only way to import many items scoped in a namespace with the current import proposal.

But if we suport importing modules directly, then I'm OK with removing the star.

@mighdoll
Copy link
Contributor

Not sure if we should drop star imports, but one clarifying point that I missed in my first pass implementation is that the star imports are more like module imports than wildcard imports.

import ./foo/*; does not bring a fn bar inside foo.wgsl into scope. It only brings foo into scope, the call site needs to use foo.bar().

So star imports are module imports. If we cook up a different syntax in #25 to handle the additional needs of namespaces aka submodules in the import syntax, sure seems like star imports would be on the chopping block.

I'd suggest we use #25 to discuss the changes needed for addressing namespaces, and then come back to #35.

@mighdoll mighdoll added the mvp label Oct 10, 2024
@mighdoll mighdoll added this to the M1 milestone Nov 18, 2024
@mighdoll mighdoll removed the mvp label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants