Skip to content

Conversation

@MichaelChirico
Copy link
Collaborator

Part of #884

This one is not violated often in our experience, but it's quite bad when it is.

x <- 1:10
for (x in x) x
x
# [1] 10

Seems like undesirable behavior.

IndrajeetPatil
IndrajeetPatil previously approved these changes Oct 7, 2022
Copy link
Collaborator

@IndrajeetPatil IndrajeetPatil left a comment

Choose a reason for hiding this comment

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

LGTM.

The only nitpick I have is using `for()` instead of for in the docs and message. But don't feel strongly about it.

@MichaelChirico
Copy link
Collaborator Author

"for loop" is a much more general programming construct, for() doesn't look right to me. I'll keep it as is. Thanks!

@IndrajeetPatil
Copy link
Collaborator

Sure, but I find it easier to parse the following

This is true for for() loops.

over this

This is true for for loops.

@IndrajeetPatil IndrajeetPatil self-requested a review October 7, 2022 09:05
@MichaelChirico
Copy link
Collaborator Author

Sure, I would disambiguate with "for for loops", but that's not used here anyway?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants