> How does someone write software that needs to run for ~50 years where the hardware will need to be replaced with non-equivalent, newer hardware?
Some ideas:
Write it in a popular language/ecosystem, stick rigidly to well-defined APIs, use commodity hardware, flatten out any malignant cleverness, maintain documentation on why every part does the thing it does, and make the source code readily available.
This is based on working with some very old systems, and each point above is the opposite of something that made life harder.
Perl was popular
Unfortunately, “popular language/ecosystem” includes JavaScript and PHP.
I’d go for “universal and timeless”, which has meant C for several decades now. There is, I’d concede, a reasonable chance that Rust obtains that label in our lifetimes.