Skip to content

Support spread elements in const collections. #82

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

Merged
merged 2 commits into from
Nov 8, 2018
Merged

Conversation

munificent
Copy link
Member

The discussion on #63 convinced me this is desirable and feasible, so I updated the proposal.

How does this look?

@lrhn
Copy link
Member

lrhn commented Nov 7, 2018

I'm still split. It's definitely feasible, but it extends the usefulness of constant list/maps in just one direction ,without doing it generally. Why can't we do length on such constant maps and lists, or use the index operator with a constant operand? Our limits are arbitrary, and this just exposes that (more).

On the other hand, spreading only allows you to create larger objects, not to inspect the contents of the individual objects, so there is still a kind of reasoning to the limitations.

Leaning LGTM. Let's do it.

@munificent
Copy link
Member Author

It's definitely feasible, but it extends the usefulness of constant list/maps in just one direction ,without doing it generally. Why can't we do length on such constant maps and lists, or use the index operator with a constant operand?

That's true of any basically any proposal that touches const. Adding any territory on either the const side or non-const side increases the length of the boundary between them, which increasingly approaches infinite length. :)

@munificent munificent merged commit 5c6b6d3 into master Nov 8, 2018
@munificent munificent deleted the const-spread branch November 8, 2018 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants