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 underscore characters in numeric literals #2995

Closed
DartBot opened this issue May 10, 2012 · 5 comments
Closed

Allow underscore characters in numeric literals #2995

DartBot opened this issue May 10, 2012 · 5 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 type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented May 10, 2012

This issue was originally filed by @ahmetaa


This is a small language feature which may improve the readability of the numeric values. It would be nice optionally allowing underscore characters in numeric literals such as:

int a = 1_000_000;
int b = 0xffff_ffff;
inc c = 0b0010_1101_1111_1010; // suppose Dart has binary literals

This is implemented in Java7 http://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html

@DartBot
Copy link
Author

DartBot commented May 10, 2012

This comment was originally written by ladicek@gmail.com


There is issue #2873 for adding binary literals. When I was playing with their implementation in the VM, I also decided to implement this idea sometime in the future. I didn't yet get to it, but I'd also love to see this in Dart.

@DartBot
Copy link
Author

DartBot commented May 11, 2012

This comment was originally written by @ahmetaa


@LADI...
yes, I wrote this issue after reading your blog post. thanks.

@sethladd
Copy link
Contributor

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

@gbracha
Copy link
Contributor

gbracha commented May 14, 2012

Set owner to @gbracha.
Added Accepted label.

@gbracha
Copy link
Contributor

gbracha commented May 24, 2012

I guess we aren't going to implement every known feature in every language. This one doesn't seem to carry its weight.


Added WontFix label.

@DartBot DartBot added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels May 24, 2012
@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug and removed resolution-wont_fix labels Mar 1, 2016
dart-bot pushed a commit that referenced this issue May 21, 2021
New commits include:
```
git log --format="%C(auto) %h %s" 00c00e8adf9706bebe8f94483b7663c5f36f59d2..def32ceb1d660552eaec24839d377199aea5a569
 def32ceb Revert "Revert "Use the frontend server to compile pub executables (#2968)" (#3006)" (#3008)
 0dc7e50c Make `.gitignore` and `.pubignore` case-insensitive on Windows / MacOS (#3009)
 e89d4ab8 Generate GNU-style long file names in tar archives (#3005)
 d2ad13d0 Revert "Use the frontend server to compile pub executables (#2968)" (#3006)
 492b15ba New binstubs for global activate using `dart pub` (#3002)
 e02f23bb fix grammer in .gitignore error message (#2995)
 e01e3a41 Use the frontend server to compile pub executables (#2968)
 647989c6 Use RetryClient from package:http/retry.dart (#2980)
```

Change-Id: I9a0b5fb2b5616a5a0eaa16f3a90205bb1bb1fc8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200878
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
dart-bot pushed a commit that referenced this issue May 21, 2021
This reverts commit 5c9e37f.

Reason for revert: flutter builds on golem somehow broke.

Original change's description:
> Bump pub.
>
> New commits include:
> ```
> git log --format="%C(auto) %h %s" 00c00e8adf9706bebe8f94483b7663c5f36f59d2..def32ceb1d660552eaec24839d377199aea5a569
>  def32ceb Revert "Revert "Use the frontend server to compile pub executables (#2968)" (#3006)" (#3008)
>  0dc7e50c Make `.gitignore` and `.pubignore` case-insensitive on Windows / MacOS (#3009)
>  e89d4ab8 Generate GNU-style long file names in tar archives (#3005)
>  d2ad13d0 Revert "Use the frontend server to compile pub executables (#2968)" (#3006)
>  492b15ba New binstubs for global activate using `dart pub` (#3002)
>  e02f23bb fix grammer in .gitignore error message (#2995)
>  e01e3a41 Use the frontend server to compile pub executables (#2968)
>  647989c6 Use RetryClient from package:http/retry.dart (#2980)
> ```
>
> Change-Id: I9a0b5fb2b5616a5a0eaa16f3a90205bb1bb1fc8f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200878
> Auto-Submit: Jonas Jensen <jonasfj@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

TBR=athom@google.com,jonasfj@google.com

Change-Id: I635e1c2db8ae965881359d4969cbd506348b0ed0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201000
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
dart-bot pushed a commit that referenced this issue May 25, 2021
This is a reland of 5c9e37f
Following update of `DEPS` in `flutter/engine`:
  flutter/engine#26395

New commits include:
```
git log --format="%C(auto) %h %s" 00c00e8adf9706bebe8f94483b7663c5f36f59d2..def32ceb1d660552eaec24839d377199aea5a569
 def32ceb Revert "Revert "Use the frontend server to compile pub executables (#2968)" (#3006)" (#3008)
 0dc7e50c Make `.gitignore` and `.pubignore` case-insensitive on Windows / MacOS (#3009)
 e89d4ab8 Generate GNU-style long file names in tar archives (#3005)
 d2ad13d0 Revert "Use the frontend server to compile pub executables (#2968)" (#3006)
 492b15ba New binstubs for global activate using `dart pub` (#3002)
 e02f23bb fix grammer in .gitignore error message (#2995)
 e01e3a41 Use the frontend server to compile pub executables (#2968)
 647989c6 Use RetryClient from package:http/retry.dart (#2980)
```

Original change's description:
> Change-Id: I9a0b5fb2b5616a5a0eaa16f3a90205bb1bb1fc8f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200878
> Auto-Submit: Jonas Jensen <jonasfj@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: I1a0570318c63ec97fd141d79b405f55105111077
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201260
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This issue was closed.
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 type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants