rustlings icon indicating copy to clipboard operation
rustlings copied to clipboard

The vec2 exercise is inappropriate

Open senekor opened this issue 1 year ago • 3 comments

The following commit added significant complexity to the exercise: https://github.com/rust-lang/rustlings/commit/8e1f617d3402cb05b05c6737f60fbbfe74da4d78

I understand the desire to show people functional programming, I love it as much as the next Rust developer. But this exercise comes pretty much right after primitive types.

Even using vectors is a stretch here, the book itself covers vectors only much later. But I think that's withing reason here, because vectors are necessary to do almost anything and most programmers will be familiar with something similar. So I think it's justified to cover vectors a bit earlier than the book.

However... iterators? map? collect? lambda syntax? I find this completely unjustified. If this content is not covered in the dedicated section for iterators, it can be moved there.

Please consider removing the vec_map part from that exercise so as not to overwhelm new learners too early.

senekor avatar Sep 10 '24 13:09 senekor

I agree. I will remove it from the exercise in v7. But I will keep it in the solution as one of the possible solutions. I will mention that we will deal with iterators later.

mo8it avatar Sep 10 '24 13:09 mo8it

Hi, what's the status on this one? Thanks for working on this.

jgarte avatar Dec 07 '24 13:12 jgarte

That part of the exercise still exists. But there is an example since 835ec7262247a341295c1d6f3772901a5fad5148 that helps people figure out what they need to do (without understanding what's going on).

Is it still planned to remove that part?

senekor avatar Sep 23 '25 13:09 senekor