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

Comments

@yazver
Copy link

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
@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 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 as completed Oct 15, 2020
@golang golang locked and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants