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

Allow list literals ranges of the form a ... b #7991

Closed
pwbecker opened this issue Jan 19, 2013 · 4 comments
Closed

Allow list literals ranges of the form a ... b #7991

pwbecker opened this issue Jan 19, 2013 · 4 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-not-planned Closed as we don't intend to take action on the reported issue P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@pwbecker
Copy link

Enhancement request:

Allow list literals to be ranges of the form a ... b

As in

for (x in [0 ... 10])

This would also solve the problem of accessing indexes within for loops (or iterate in web_ui)
  

@sethladd
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Language, Triaged labels.

@pwbecker
Copy link
Author

Apologies for missing the summary line. Should read:
"Allow list literals ranges of the form a ... b"

@gbracha
Copy link
Contributor

gbracha commented Jan 22, 2013

Set owner to @gbracha.
Added Accepted label.
Changed the title to: "Allow list literals ranges of the form a ... b".

@pwbecker pwbecker added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Jan 22, 2013
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed accepted labels Feb 29, 2016
@munificent
Copy link
Member

This would make it really easy to create lists that allocate a monumental amount of memory when all you really want to do is loop through them. It could return an Iterable instead, but then the [ ... ] syntax starts to look misleading.

For a more general "do something for ranges", we'll use #26307 to track that. I'm going to close this one because I don't think we want a solution that involves actually creating a list of numbers.

@munificent munificent added the closed-not-planned Closed as we don't intend to take action on the reported issue label Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-not-planned Closed as we don't intend to take action on the reported issue P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants