3 ms·
> One file has 3000 lines of code, and is a huge switch() statement. Kids these days. I once worked on a system where the size of the switch statement broke t
by IvyMike 13y ago
> One file has 3000 lines of code, and is a huge switch() statement.
Kids these days. I once worked on a system where the size of the switch statement broke the compiler. I believe the limit was 64k lines in a switch, although my memory is a little hazy. Of course you couldn't actually reasonably edit a single file with that much code, so it was split into several files, each of which was still thousands of lines long, but at least you could load the smaller files without crashing emacs with out-of-memory errors.
switch (action)
{
#include <actionsetA.cpp>
#include <actionsetB.cpp>
#include <actionsetC.cpp>
// etc
default: printf("unhandled action")
}