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

When the same operator is used consecutively, support to append the operatior at the end #2885

Open
normidar opened this issue Mar 4, 2023 · 2 comments
Labels
feature Proposed language feature that solves one or more problems

Comments

@normidar
Copy link

normidar commented Mar 4, 2023

now, dart support

var lst = [
  a,
  b,
];

but not supprt

var lst = 
  a &&
  b &&;

or

if ( a &&
b &&) {
.....
}

I think this feature is useful.

@normidar normidar added the feature Proposed language feature that solves one or more problems label Mar 4, 2023
@normidar
Copy link
Author

normidar commented Mar 4, 2023

If I have a statement :

if (
cond1 &&
cond2 &&
cond3 &&
cond4 &&
cond5 &&
) {
....
}

I can comment-out anywhere.

@Wdestroier
Copy link

What about <<, >>, >>>, &, ^, |, *, /, ~/, % +, -, as, is, is!, .., =, *=, /=, +=, -=, &=, ^=, <<=, >>=, ??=, ~/=, |=, %=, ==, != and ||? I suspect not too many people will frequently write large if statements, always followed by the same operator and want to break the last line. I would prefer , as a consistent approach to break the line before ending the if statement/expression. Considering issue #69 is on hold for about 5 years, I believe this will be time-consuming to implement.

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