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

Feature: Short form of import package #45897

Closed
ggdream opened this issue May 4, 2021 · 4 comments
Closed

Feature: Short form of import package #45897

ggdream opened this issue May 4, 2021 · 4 comments
Labels
closed-duplicate Closed in favor of an existing report

Comments

@ggdream
Copy link

ggdream commented May 4, 2021

  • Dart VM

e.g.

  • For Ts/Js, if had a path of router/index.ts, we will call the package by import some from 'router', rather than import some from 'router/index.ts'.

  • Python, it has __init__, supports it.

In Dart, because there is no such mechanism, it makes the guide packet path redundant. Do you have any relevant plans? If not, what are the reasons?

@simolus3
Copy link
Contributor

simolus3 commented May 4, 2021

You can see dart-lang/language#649 for ideas and work on this.

@lrhn
Copy link
Member

lrhn commented May 4, 2021

Agree, the language issue has the current thoughts on shorthands for imports. It's one proposal, others are definitely possible.
It's not currently scheduled, but a better import syntax is something we do want to add eventually.

@lrhn lrhn closed this as completed May 4, 2021
@lrhn lrhn added the closed-duplicate Closed in favor of an existing report label May 4, 2021
@ggdream
Copy link
Author

ggdream commented May 10, 2021

You can see dart-lang/language#649 for ideas and work on this.

Thanks

@ggdream
Copy link
Author

ggdream commented May 10, 2021

同意,语言问题具有当前关于进口捷径的想法。这是一个建议,其他建议绝对有可能。
目前尚未安排,但我们希望最终添加更好的导入语法。
Thanks,
Expect that likes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

3 participants