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

proposal: Go 2: add optional types #41992

Closed
yazver opened this issue Oct 15, 2020 · 1 comment
Closed

proposal: Go 2: add optional types #41992

yazver opened this issue Oct 15, 2020 · 1 comment
Labels
Milestone

Comments

@yazver
Copy link

@yazver yazver commented Oct 15, 2020

Add optional types:

func (v *Value) Convert(to string?, from string?) {
    if from, ok := to?; ok {
        v.Value = from // *from
    }
    ...
}

v.Convert(from: "some value")
@gopherbot gopherbot added this to the Proposal milestone Oct 15, 2020
@gopherbot gopherbot added the Proposal label Oct 15, 2020
@yazver yazver changed the title proposal: Go2 add optional types proposal: Go 2 add optional types Oct 15, 2020
@yazver yazver changed the title proposal: Go 2 add optional types proposal: Go 2: add optional types Oct 15, 2020
@ALTree
Copy link
Member

@ALTree ALTree commented Oct 15, 2020

This would be a fairly major language change, and this issue doesn't have enough details (not even remotely) in it. Major changes to how the language works need to come with a detailed, comprehensive discussion of the proposed change.

Here's the proposals template: https://github.com/golang/proposal/blob/master/design/TEMPLATE.md

If you're interested, you may want to fill that out in detail. Feel free to open a new issue when you're done. I'm closing here since we don't really use the Issue Tracker as a dumping ground for barely sketched-out ideas. Thanks!

@ALTree ALTree closed this Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.