The major reason why 4th generation fighters are likely to stick around for a long time is that many can be considered true multirole aircraft.

As Russian and China’s 5th generation stealth fighters are nearing completion, some people are wondering how long much longer 4th generation fighters such as the F-16, F-15, Su-27, and MiG-29 are going to stick around. But if earlier trends are to be believed, these “old” fighters may continue to serve into the 2040s or longer.

The major reason why 4th generation fighters are likely to stick around for a long time is that many can be considered true multirole aircraft. While many aircraft before the 4th generation could be described as multirole, such as the F-4 Phantom II, the 4th generation of jets took multirole to the next level with advances in computer technology that allowed for easy reprogramming of the aircraft for different weapon types and missions.

Better computers allowed for the integration of the multi-function display. While these were not on the initial versions of 4th gen fighters, they began to be introduced in the mid 1980s with the F-16C. MFDs are now present in almost every 4th generation fighter.

MFDs allow for easier integration of new weapons. Before, new weapons might require dedicated control boxes to be added to various portions of the cockpit to allow the pilot to control them. MFDs simplify this and make it more of a programming matter, as they have multiple screens that can display targeting data or even images from a seeker of a missile.

While 5th generation aircraft also feature MFDs, their presence on 4th generation aircraft means that integrating new weapons on them is significantly easier than on the previous generations. Since many 4th generation aircraft were designed with MFDs in mind in the cockpit, the ergonomics of them are built around it, and upgrading the MFDs themselves is usually a straightforward task, compared to retrofitting an MFD into an aircraft that was designed without one.

Advancing computer technology also allows for radars to be far more flexible than they were before. In the prior generation, aircraft tended to focus on ground or the air for their radar, with the radars losing significant amounts of functionality when switching between the modes.

With improvements in computing and the introduction of electronically scanned array (ESA) radars, radars became far more flexible, being able to operate in both air-to-air and air-to-ground modes with acceptable performance. The good performance of the radar in both modes was one of the reasons why the F/A-18 carries both the F and A letters in its designation.

For those 4th generation jets that came before these innovations in radar, there is another trend could allow them to serve for a long time: the miniaturization and modularization of electronics. Since it’s easier to create high performing radars in a compact package with new technology, the radar of 4th generation gets can keep pace with newer aircraft.

New advanced radars have even been retrofitted to third generation fighters like the MiG-21 and Mirage III, although the older designs of these aircraft may require some wiring to be placed under aerodynamic fairings outside of the main hull of the aircraft, like those seen on the MiG-21 LanceR.

In addition to purely technical reasons, 4th generation aircraft packed with new upgrades are often “good enough” for countries. Now that stealth aircraft have been around for some time, countries have seen that while it is a significant boost in capability, non-stealth aircraft still have a significant place on the battlefield, especially against non-peer threats.

Recommended: Imagine a U.S. Air Force That Never Built the B-52 Bomber

Recommended: Russia's Next Big Military Sale - To Mexico?

Recommended: Would China Really Invade Taiwan?

Despite these reasons for keeping 4th generation aircraft in service, many are truly reaching the end of their lifespan. The earliest jets of the generation were built in the 1970s, so some jets have almost forty years of service on them. These jets probably will be retired for good.

But 4th generation fighters are still rolling off the production line for export. As the U.S. Air Force tries to retire and sell its old stocks of F-16As, Lockheed Martin is still churning out new F-16s (albeit built to a far more advanced standard) for countries like Slovakia and Bahrain in 2018. These new production aircraft will likely serve for many decades.

Similarly, advanced Russian aircraft like the Su-35S and MiG-35 are being built right now for export customers. Since countries tend to loathe to retire an aircraft until at least two to three decades of service, we’ll likely see these planes flying into the 2050s, if not longer.

Charlie Gao studied political and computer science at Grinnell College and is a frequent commentator on defense and national-security issues.