You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't a bug: this is a proposal to change the language. As such, it needs to follow https://github.com/golang/proposal/blob/master/README.md I would recommend reading some existing issues with the Proposal label to get an idea of what sort of information you should include.
There needs to be a lot more information here. Are there differences in use between a const func and a var func? If you have a const func what can't you do with it. Is the only benefit http.Handlers or are there others? What are the downsides? Is const f = decorator(anotherFunc) legal?
I'm going to close this issue. Please create a new issue when you have a more fleshed out proposal or comment on one of the current issues for extending what can be const, such as #21130, and make an argument for including func as well.
What version of Go are you using (
go version
)?Go 1.10
Does this issue reproduce with the latest release?
Yes
What did you do?
Play link:
What did you expect to see?
Succesful compilation.
What did you see instead?
Comment
Being able to make constant functions with a named type would be useful for
http.HandlerFunc
.The text was updated successfully, but these errors were encountered: