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

Clearer when using a range expression #27

Closed
wants to merge 1 commit into from
Closed

Clearer when using a range expression #27

wants to merge 1 commit into from

Conversation

gvwilson
Copy link
Contributor

I had to read the c(...) very carefully to make sure it was just a range - I think that'll be more immediately clear this way.

Copy link
Contributor

@garrettgman garrettgman left a comment

Choose a reason for hiding this comment

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

@gvwilson I'm not in favor of the change because : is not explained in this tutorial (i.e. it falls into the expert blindspot). But it does raise the question, when should we consider a feature of the language to be basic knowledge? Also, when should we expect students to take tutorials in order? I can be convinced if you want to try.

@gvwilson
Copy link
Contributor Author

We could avoid the problem by using c(1, 2, 3, 4, 5) (so that it's immediately obvious that it's a continuous range) - I think that splitting that into two's would illustrate the point well enough (?). Alternatively, the text could say, "We'll create the vector of numbers from 1 to 10 using the range notation 1:10" and then the code could show it - I don't think anyone reading this tutorial will be thrown by that at all.

@gvwilson gvwilson closed this Aug 2, 2024
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.

None yet

2 participants