Skip to content

Simplified imports with inferred filenames? #899

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

Closed
jamesderlin opened this issue Mar 27, 2020 · 2 comments
Closed

Simplified imports with inferred filenames? #899

jamesderlin opened this issue Mar 27, 2020 · 2 comments
Labels
feature Proposed language feature that solves one or more problems

Comments

@jamesderlin
Copy link

Most of the time, my Dart imports look like:

import 'dart:foo';

import 'package:bar/bar.dart';
import 'package:baz/baz.dart';
import 'package:some_descriptively_named_package/some_descriptively_named_package.dart';
  1. package: imports very often have a lot of redundancy.
  2. package: imports aren't consistent with dart: imports.

It's a minor cosmetic nit, but could we allow a simpler form where the filename is inferred? That is, import 'package:NAME' would be syntactic sugar for import 'package:NAME/NAME.dart'.

@jamesderlin jamesderlin added the feature Proposed language feature that solves one or more problems label Mar 27, 2020
@srawlins
Copy link
Member

This looks like a duplicate of #649

@jamesderlin
Copy link
Author

Ah, thanks. I somehow couldn't manage to find that when searching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Proposed language feature that solves one or more problems
Projects
None yet
Development

No branches or pull requests

2 participants