carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
http://docs.carbon-lang.dev/
Other
32.28k stars 1.48k forks source link

Variadics syntax #2846

Open geoffromer opened 1 year ago

geoffromer commented 1 year ago

Summary of issue:

The variadics syntax currently proposed in #2240 is based on symbolic tokens that are quite visually noisy (if not downright ugly). Following discussions at C++Now, I've added a keyword-based syntax as an alternative-considered. It's worth noting that it isn't purely a "re-skin" -- it entails some minor functional and conceptual changes, and probably a different approach to exposition, so changing syntaxes will not be a mere find/replace. For that reason, and because changing the basic vocabulary mid-stream could be disruptive to the discussion, I don't want to change the body of the proposal to the new syntax unless we're confident that it's what we will adopt (or at least pretty close).

Consequently, I would appreciate a decision from the leads about which syntax we should use for variadics.

Details:

See #2240, especially the "Proposal" and "Keyword syntax" sections of p2240.md, which describe the alternatives and the tradeoffs between them. I'm not sure if it will be useful to duplicate any of that here, since it may change based on review feedback. I am of course open to changing the spellings and other specifics of the two alternatives, and/or adding more alternatives, but I'd tentatively suggest having those discussions on the review of #2240, and reserving this issue for discussion of the final choice.

Any other information that you want to share?

No response

geoffromer commented 1 year ago

I've made some major revisions to #2240 that somewhat change the context for this question. In particular: