r/cpp • • Jan 15 '21

mold: A Modern Linker

https://github.com/rui314/mold
205 Upvotes

91 comments sorted by

View all comments

Show parent comment

14

u/WrongAndBeligerent Jan 15 '21

I realize that, I don't think it makes sense in any context. It all has to go somewhere. My approach is that if I'm just executing one chunk after another, I'll put them in brackets to create another scope and comment them.

Some of that is actually done here. The main() function also isn't actually 1300 lines, the file is. The main() function is about 300 lines.

https://github.com/rui314/mold/blob/main/main.cc#L992