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

Redesign _ -> identity transforms #2

Closed
rapus95 opened this issue Mar 20, 2020 · 2 comments
Closed

Redesign _ -> identity transforms #2

rapus95 opened this issue Mar 20, 2020 · 2 comments

Comments

@rapus95
Copy link

rapus95 commented Mar 20, 2020

Suggestion: Whenever some underscore tends to be replaced by an identity function, make the anonymous function escape a single layer.
That will automatically enable cases like that:
1:10 |> filter(_<5, _)
while we don't lose a relevant feature. Using _ instead of identity shouldn't be considered good style anyway.

@haberdashPI
Copy link

Seems related to my suggestion in #1; I agree with the comments on #24990 that using the _ to mean two things in the same expression could be pretty confusing to a reader of the code.

@c42f
Copy link
Owner

c42f commented Mar 21, 2020

Agreed, I think this is a dup of #1 (in terms of functionality), let's continue the discussion there :-)

@c42f c42f closed this as completed Mar 21, 2020
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

3 participants