Skip to content

Update higher-order-functions.md #1351

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

Merged
merged 2 commits into from
Jul 8, 2019
Merged

Conversation

cclaudiu81
Copy link
Contributor

enhanced doc on methods that take fns as args

enhanced doc on methods that take fns as args
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it's a good idea to express how easy it is to close over and leak internal state with closures, but my thinking is if we want to do this we should do it in a better place, perhaps in the introduction. Also, I think this could use some rewording (functions leak internal state, not "escape" the internal state).

@cclaudiu81
Copy link
Contributor Author

you can do it in any place you want :) i just wanted to emphasize the idea that overusing closures when objects are used to represent the domain could produce some dangerous things... they can easily become antipatterns just like everything which is overused...In this context "leak internal state" i see it as a synonym for "escape internal state"...but again if you consider "leak internal state" is more appropriate then go ahead and use it.

@SethTisue
Copy link
Member

@cclaudiu81 there isn't anyone who's job it is to take pull requests and put them into final form. if you're interested in responding to the review feedback yourself, great. if not, we'll close the PR, while inviting other volunteers to submit their own versions if they like.

@cclaudiu81
Copy link
Contributor Author

@SethTisue will add this information as PR changes. thanks!

refactored OO info in the page intro & change small things based on the PR review.
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SethTisue SethTisue merged commit f2f7072 into scala:master Jul 8, 2019
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.

3 participants