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

make eta_reduction less aggressive #76

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Conversation

astro
Copy link
Contributor

@astro astro commented Apr 20, 2023

Hi! Thank you for this very useful tool.

I found the eta-reduction to be too aggressive for all cases, reducing code readability in complex lambda expressions. When there are more arguments to the call in the lambda body, explicit arguments indicate more useful information to the reader. My idea is to add a restriction that makes it only run for the most primitive expressions. Is that an idea worth pursuing?

The test fixture is a bit contrived. Real-world code can be more complex.

@oppiliappan
Copy link
Owner

hi, thanks for the PR, i think i do agree with the changes here, the reduced form leads to too much mental gymnastics sometimes.

@oppiliappan
Copy link
Owner

thanks for the contribution!

@oppiliappan oppiliappan merged commit bcb3d10 into oppiliappan:master Jul 5, 2023
@astro astro deleted the eta branch July 6, 2023 17:04
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

Successfully merging this pull request may close these issues.

2 participants