-
Notifications
You must be signed in to change notification settings - Fork 205
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
Glob or RegExp import/export #1709
Comments
This would probably have to be part of a larger reworking of the import statements. |
@lrhn Tnx about your comment, but, dart team has any plan or solution to make these situations easier? |
There is no current plan to add glob/regexp support. We are, and have long been, considering making import syntax more convenient (#649), but it's not part of any current schedule. (I'm not sure I like glob patterns for imports. Currently you can click on an import in your editor and be sent to the imported file. A glob import won't be able to do that. It also risks accidental imports. Say, if your editor saves a temp file named |
Thank you about your response.🤝🙌 |
Sane editors don't use prefix, but rather suffix e.g. |
We should not add a feature where it becomes a potentially breaking change to add a new library to a package. Adding new features in new libraries is an approach that we occasionally use specifically to avoid major version bumps. |
Could you elaborate? What breaking change are you talking about? What new features in what libraries? |
You confuse URIs with URLs all over the place... Example of URI |
The breaking change would be someone importing If glob patters only work for relative imports, it's probably less dangerous. Also, URLs are URIs, and the Dart |
Programmers shall not be that dumb to not be aware that URLs are of course URIs, but you clearly need to support only its subset, that is URL. |
Usage
In some situation, we need to export (sometimes import) multiple files, and the whole of them are located in the same directory
Syntax
we can import/export with glob or RegExp syntax. With this feature, we don't need to export like this or creating multiple mini-libraries:
instead, we can use it like:
I'll happy with your ideas and comments =)
The text was updated successfully, but these errors were encountered: