We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would like to open the discussion on a "feature" called trailing comma in Python, Rust, JavaScript, Kotlin, C99, or C++11.
Anywhere there is a comma-separated list, allow a trailing comma after the last element of the list.
For example allow:
Plop : Array_Type (1 .. 4) := ( 1, 2, 3, 4, );
Since this is Ada/SPARK, we could also allow trailing semi-colon:
procedure Plop ( A : Natural; B : Float; C : Integer; );
The motivation is the same as with other languages allowing trailing commas:
At this point I don't see a negative side for this.
As far as alternatives, I've seen some codebases where people put the comma at the beginning of the list:
enum Channel { RED ,GREEN ,BLUE };
Which works for adding new elements inside or at the end of the list. But the problem remains for the beginning.
The text was updated successfully, but these errors were encountered:
I agree this is a "low hanging fruit" in terms of UX. Putting that up for discussion
Sorry, something went wrong.
No branches or pull requests
Summary
I would like to open the discussion on a "feature" called trailing comma in Python, Rust, JavaScript, Kotlin, C99, or C++11.
Anywhere there is a comma-separated list, allow a trailing comma after the last element of the list.
For example allow:
Since this is Ada/SPARK, we could also allow trailing semi-colon:
Motivation
The motivation is the same as with other languages allowing trailing commas:
Caveats and alternatives
At this point I don't see a negative side for this.
As far as alternatives, I've seen some codebases where people put the comma at the beginning of the list:
Which works for adding new elements inside or at the end of the list. But the problem remains for the beginning.
The text was updated successfully, but these errors were encountered: