The F-22 was
designed with plenty of room for avionics growth and change, but weight wasn't a major issue.
The F-35 is designed without the expandability, but using COTS components with the ability to swop them out and replace with later generation components by using
LM proprietary middleware [ (think in terms of the Windows Kernel having a
Hardware Abstraction Level).
I just wonder at the cost and complexity of recertifying 24M+ lines of code at each change. Windows is a lot less complex, and I'd hate to end up with a BSD at 40K feet at night.