3 ms·
Only #if you ignore the hundred other issues with building portable c++ code: * Libraries * ABIs * Build system(s) * Platform compiler support... In compiled/
by smaudet 3y ago
Only #if you ignore the hundred other issues with building portable c++ code:
* Libraries
* ABIs
* Build system(s)
* Platform compiler support...
In compiled/interpreted land, most if not all of these are solved problems. Even for libraries, usually dependencies can be reliably downloaded and recompiled (if they are not compiled on the fly).
I don't really care if you can create a "portable header" library when the ecosystem is sharded, and "portable" only holds true for some subset of c++ compiler/platforms.
- adrianN 3y agoThat seems orthogonal to having multiple frontends. I have in fact worked on several systems that compiled under three compilers and ran on multiple architectures and/or operating systems and it was not a hot mess of ifdef spaghetti.
- smaudet 3y agoIts orthogonal to ifdef sphaghetti so long as that's not in support of the (general) sphaghetti. I'm not specifically commenting on ifdefs, because ifdefs are only a small part of the issue (caused by multiple compiler frontends).