Someone who used to be on reddit and decided to try lemmy!
https://github.com/davawen

  • 0 Posts
  • 14 Comments
Joined 1 year ago
cake
Cake day: August 27th, 2023

help-circle












  • ???
    I fail to see the point of this blog post.
    The example given makes no sense (maybe because it’s very simplistic, and a more complicated one would show the point better?), you would NEVER use .iter().count() if you had direct access to the Vec. The iterator is more general in this sense.

    You would use it if, say, your Settings struct was generic over an Iterator type, and in that case it’s the whole point, isn’t it?? Like what???

    Plus, I wouldn’t say this erodes type safety, it’s a lot more like a logic error.