3 ms·
I think the core problem is that actually compiling for different operating systems is essentially none of the work needed for compatability and provides a stag
by joveian 6y ago
I think the core problem is that actually compiling for different operating systems is essentially none of the work needed for compatability and provides a stage that lets you remove stuff that isn't needed for that OS, while using bytecode makes it possible to support different instruction sets and can be compiled for the platform it is used on as needed or ahead of time.
Going the other way, if an application is distributed as a VM or other method of minimal reliance on the host OS it has all the issues of static binaries (heavier resource use, can't benefit from general updates) plus it won't have the look and feel of different operating systems unless it includes all that complexity on every OS. There are a number of other compromises that could be made vs. the most commonly used ones, but it is all a matter of tradeoffs. E.g. Flatpack has a set of base images as well as the application image, but it seems to have issues with the availability of dependencies.
The closer operating systems are the easier it is for a single executable to work. The BSDs have have been able to run binaries from various other operating systems, however as the other operating systems change it a lot of work to keep up and some OS APIs are just bad ideas that would compromise the operating system if they are adopted (in some cases a better way to allow compatibility could be created with a lot more work).
One option that I am interested in that might gain some popularity at some point would be to run a much simpler OS in a VM that can do some of the useful things you want a computer to do while not trying to do all of them but without trying to make individual applications fit in with the host OS. This would require users to learn two operating systems but would make the small OS easier to understand in detail and would have some significant security advantages due to being able to impose restrictions that would excessively restrict a general purpose OS. However, there will always be pressure to integrate more into the host OS. A major issue limiting this possibility right now is the situtation with GPU access from a VM. Also, commercial OS vendors are more than willing to make gratuitous incompatabilities to limit any alternative that starts to grow in popularity.