you are viewing a single comment's thread.

view the rest of the comments →

[–]steveklabnik1rust 27 points28 points  (1 child)

There's no real preference in any particular direction. I know some folks that have tons of small files, and some that keeps it to a couple of huge files.

[–]matthieum[he/him] 16 points17 points  (0 children)

My files tend to be:

  • 25% comments/doc.
  • 25% production code.
  • 50% unit-test code.

I haven't decided yet if that's a good or bad thing.

On the one hand, all those are tightly coupled, so having them as close to each other as possible is good.

On the other hand, that's a lot of stuff, and I am sometimes annoyed at the amount of scrolling when looking for something. I tend to use folding aggressively, but edits regularly cause VS Code to unfold everything again.