4 ms·
All of the argument parsing functions are insanely large, at least most of the actual individual argument handling stuff is autogenerated. [edit: a lot of the
by olliej 3y ago
All of the argument parsing functions are insanely large, at least most of the actual individual argument handling stuff is autogenerated.
[edit: a lot of the older code involves huge single functions, webkit, etc are similar and I suspect it’s true of most projects. It seems like a fairly standard code evolution pattern: a function is written, and keeps have logic added so it becomes bigger and bigger, until eventually someone adds something where refactoring makes enough sense that the functions are broken up. I wonder if someone has ever just done an analysis of commit history vs function size to see just how common this actually is. Something like “how old vs how recently modified vs function size” - I’m genuinely curious]
- ekeane 3y agoThe clang driver is particularly bad at this. There is a frequent 'just add one more thing here!' in every section of the driver. Additionally, it is large, somewhat complex, and not very exciting, so those refactors/simplifications don't happen nearly as often as other parts of the clang code base. The tablegen/macro-gen stuff DID get added at one point fortunately, but before that it was pretty rough as well.