I said function, not file. You can have 40 functions in one file.
Comment on monumentale
Gonzako@lemmy.world 1 day agoI personally go by the monocre that if it’s something important, it’d be all on one file as not to lose the train of thought when debugging it.
As jumping around between files
tends to break up thought lines
also, the compiler likes it better when there’s layers
- kryptonianCodeMonkey@lemmy.world 1 day ago- Gonzako@lemmy.world 1 day ago- oh yeah, that’s fair. 
 
- Johanno@feddit.org 1 day ago- Are those your arguments? - Train of thought is subjective - And the compiler doesn’t care - Gonzako@lemmy.world 1 day ago- Yeah? If something is important being able to have it all on one file is the best way to ensure you get the behaviour you want. - Having to file-hop is generally a strain on mental resources and it breaks the linearity of the project, ofuscating initial reads. - And yes, the compiler does care, there are no 0-cost abstractions. - Johanno@feddit.org 1 day ago- Yesnt. - If the alternative to changing into a new file is to search through a 40k lines file that has no structure, then I rather go to a new file. As my train of thoughts is interrupted by the size of the file. - And a good compiler is capable of a lot these days. However if you are working on low end hardware that has to perform good and fast then you should of course think about the compiler. - In 99% of software that isn’t the case though 
 
 
LodeMike@lemmy.today 1 day ago
The compiler can get fucked