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

deprecate multiple-underscore-only variable names #22982

Closed
stevengj opened this issue Jul 27, 2017 · 2 comments
Closed

deprecate multiple-underscore-only variable names #22982

stevengj opened this issue Jul 27, 2017 · 2 comments
Assignees
Milestone

Comments

@stevengj
Copy link
Member

stevengj commented Jul 27, 2017

We already deprecate _ as a variable name. Hopefully, we can eventually use it as a placeholder for discarded lhs values (#9343) and/or for a compact anonymous-function/currying syntax (e.g. _.a for x -> x.a: #554, #5571, #22710).

As I discussed with @Keno today, it might be good to additionally deprecate all variable names consisting only of underscores, e.g. __ or ___. It is weird to disallow _ but allow __, and multiple underscores might be useful for something later.

(One possible use: in an implicit currying syntax, make f(g(_,y)) denote f(x -> g(x,y)) and f(g(__,x) denote x -> f(g(x,y)), i.e. _ is "tight" and __ is "loose".)

@stevengj stevengj added the needs decision A decision on this change is needed label Jul 27, 2017
@Keno Keno added this to the 1.0 milestone Jul 27, 2017
@StefanKarpinski StefanKarpinski changed the title deprecate multiple-underscore variable names deprecate multiple-underscore-only variable names Jul 27, 2017
@StefanKarpinski
Copy link
Member

+1 to deprecation, whether we want this to mean anything is a different matter.

@JeffBezanson JeffBezanson self-assigned this Aug 3, 2017
@StefanKarpinski
Copy link
Member

Just to be conservative, we should deprecate these. If they're deprecated we can always change our minds but we can't go in the other direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants