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

FR: Allow grouping of elements in assignments #1747

Closed
wpkelso opened this issue Nov 26, 2023 · 1 comment
Closed

FR: Allow grouping of elements in assignments #1747

wpkelso opened this issue Nov 26, 2023 · 1 comment

Comments

@wpkelso
Copy link

wpkelso commented Nov 26, 2023

Example

// Current method
A -> C
B -> C

// Proposed method
A, B -> C

The syntax is obviously only a suggestion, but I think it fits with the existing syntax (another option could be to group using braces, i.e. {A, B} -> C).

Reasoning

As near as I can tell, we currently have no way to group elements in assignments. This means that if we have multiple elements going to one element or vice versa, the source file can get unwieldy with large amounts of similar lines. Collapsing them would make the source more legible.

@cyborg-ts cyborg-ts added this to D2 Nov 26, 2023
@alixander
Copy link
Collaborator

Thank you for this. Folks have come to same conclusion, will aggregate in first issue: #742

@alixander alixander closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
@github-project-automation github-project-automation bot moved this to Done in D2 Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants