-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow wildcard "_" as const pattern #2243
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
Comments
Nit: I feel this issue would be better simply by having some method--any method--of generating a hygienic name for an item (a const, fn, mod, etc.) inside a macro just like we are capable of doing (or perhaps, rather, forced to do) for local variables. |
For |
@SimonSapin yes, I'm mainly after the side effects. This is one way I can think of achieving what I want with minimal effect on the language. This is also a backwards-compatible change. A |
|
I actually spoke to Niko about this a month ago. He recommended to add something like my @eddyb I really like the idea of adding constant destructuring to the language! This should also work for statics. |
Closing in favor of #2526. |
One of the things holding
static_assertions
from becoming 1.0 is a restriction on where the wildcard identifier is allowed. I'm requesting thatconst
s may be allowed to use_
just like withlet
bindings.The text was updated successfully, but these errors were encountered: