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

embed: remove type spelling restrictions #43602

Closed
rsc opened this issue Jan 8, 2021 · 4 comments
Closed

embed: remove type spelling restrictions #43602

rsc opened this issue Jan 8, 2021 · 4 comments

Comments

@rsc
Copy link
Contributor

rsc commented Jan 8, 2021

In #43217 (comment) I suggested two changes:

  • Drop the import restriction for embed.
  • Drop the type spelling restrictions for embed.

The reaction is for the most part overwhelmingly positive. But dropping the import restriction has generated some important discussion, while dropping the type spelling restriction seems completely uncontroversial.

I've forked this issue off of #43217 to track only dropping the type spelling restriction. Then #43217 can be only about dropping the import restriction.

@rsc rsc added this to the Proposal milestone Jan 8, 2021
@rsc rsc added this to Likely Accept in Proposals (old) Jan 8, 2021
@rsc
Copy link
Contributor Author

rsc commented Jan 8, 2021

(The Likely Accept is inherited from #43217, which this was split off from.)

@gopherbot
Copy link

Change https://golang.org/cl/282715 mentions this issue: cmd/compile: allow embed into any string or byte slice type

@rsc rsc moved this from Likely Accept to Accepted in Proposals (old) Jan 13, 2021
@rsc
Copy link
Contributor Author

rsc commented Jan 13, 2021

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

@rsc rsc changed the title proposal: embed: remove type spelling restrictions embed: remove type spelling restrictions Jan 13, 2021
@rsc rsc modified the milestones: Proposal, Backlog Jan 13, 2021
@gopherbot
Copy link

Change https://golang.org/cl/288072 mentions this issue: embed: update docs for proposal tweaks

gopherbot pushed a commit that referenced this issue Jan 29, 2021
//go:embed variables can be type aliases.

//go:embed variables can't be local to a function.

For #43216
For #43602
Fixes #43978

Change-Id: Ib1d104dfa32b97c91d8bfc5ed5d461ca14da188f
Reviewed-on: https://go-review.googlesource.com/c/go/+/288072
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
@golang golang locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

3 participants
@rsc @gopherbot and others