10/14/2024

Thread

Tweet 1

Why is it conventional to write a program across multiple files?

---

Tweet 2

You want to be able to build up an understanding of a program piece by piece but couldn't those pieces be functions/classes all defined in one file?

---

Tweet 3

Modularity as in the ability to use one piece without importing the whole thing is perhaps desirable but does it happen in practice? When you pip install/npm install you get all the files and likely almost all the code is imported transitively at runtime

---

Tweet 4

Maybe historically it was unreasonable to open 100k line files but it seems like not a significant bottleneck now

---

Tweet 5

Wtf he beat me to it by 2 hours

---

Tweet 6

I wonder what the largest one file code base is

---