3 ms·
If I write a C program, especially with the appropriate compiler warnings enabled, or some filesystem code, there is a high chance that it will work across plat
by fools 6y ago
If I write a C program, especially with the appropriate compiler warnings enabled, or some filesystem code, there is a high chance that it will work across platforms with no further coding necessary. Anecdotally, the same cannot be said for CSS or SQL.
It doesn't matter much for SQL, because I always know what database I'm using, but for CSS, it's a massive pain.
- acdha 6y agoThat's a charming belief about C which is only true if you work on the same operating system, processor, and don't do anything complicated. If those are not true, as I've experienced many times over the years, you will learn otherwise about things like differences in floating point behaviour, memory allocation and access patterns, which filesystem and/or locking semantics, etc. In other words, it's about as true as it is for CSS and SQL, where that kind of simple use is also stable.
- fools 6y agoYes, I write fairly boring applications. But the point is that C is mostly cross-platform for those boring applications, whereas the the "cross-platformness" of CSS and SQL fall apart for even the simplest of tasks.
- acdha 6y agoAgain, I think you're viewing this through the lens of relative experience. I have seen tons of C code which required substantial fixes to work portably (bonus points when this was exploitable) and I have plenty of CSS and SQL which hasn't had to be touched in years.