"And making the current GCC core base modular is not easy (it might be impossible), because we cannot decide at a glance to what module a given current code should belong."

Basile Starynkevitch on the GCC mailing list.

This is why doing your architecture right from day one is important. If you just write code anywhere, without trying to uphold principles such as separation of concerns and the Law of Demeter, you’ll end up with a tangled mess that you can’t untangle.

Such code makes all maintenance work (not to mention adding features) harder, makes it harder to bring in new developers (and, in the case of an open-source project, will discourage people from volunteering), and makes it hard-to-impossible to give your program a plug-in or library API (which is what the linked thread is about).

This is why you need to uphold good code architecture at all times. And if a hack is truly necessary, file a bug on it against your next version—it’s technical debt, and it will hurt you more the longer you don’t pay it off.

(Disclaimers: (1) I have never gazed into the GCC code base, nor it into me, and (2) I am brazenly taking Starynkevitch’s words out of context here.)

(Source: twitter.com)