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

Support multiple implicitly typed local variables in a single declaration. #5048

Closed

Conversation

CyrusNajmabadi
Copy link
Member

Fixes: #4294

@gafter gafter added 4 - In Review A fix for the issue is submitted for review. Area-Language Design labels Sep 8, 2015
@gafter
Copy link
Member

gafter commented Sep 8, 2015

I'm not sure I understand why this is viewed as an improvement to the language.

@CyrusNajmabadi
Copy link
Member Author

@gafter We can talk about it at today's LDM.

@gafter gafter added Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on. and removed 4 - In Review A fix for the issue is submitted for review. labels Oct 5, 2015
@gafter gafter closed this Oct 5, 2015
@CyrusNajmabadi
Copy link
Member Author

@gafter Hey Neal... why was this closed? Thanks!

@gafter
Copy link
Member

gafter commented Oct 5, 2015

@CyrusNajmabadi Based on LDM "never".

@CyrusNajmabadi
Copy link
Member Author

Really? That seems rather unfortunate. My proposal provided a way to allow this functionality in a way that simply allowed more scenarios when there was no chance of confusion or other problems. From the last LDM where I remember talking about this, the options were:

  1. Don't do anything.
  2. Allow multi-var, if all the types were the same.
  3. Allow multi-var, the type of all the locals is the 'best common type'.
  4. Allow multi-var, each local gets its own inferred type.

There were problems with both 3 and 4. Namely that there was a split (both in the LDM and the community) as to which was better. However, there was no problem with '2' afaik. Indeed, '2' had the benefit that it didn't exclude us from doing '3' or '4' in the future if we wanted to. So '2' was a strictly positive step forward for where we are now, with no downsides (that I can remember). It does not disallow anything allowed today, and it at least allows multi-var in some common cases where the user does want to use the same type for each var.

What's the reason we think 'never' is appropriate here? Thanks!

@gafter
Copy link
Member

gafter commented Oct 5, 2015

@CyrusNajmabadi Excellent question to raise at the LDM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Language Design cla-already-signed Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants