4 ms·
Nah, it's had those advantages since year 1. Like the the other guy said, it's pretty much high level, portable assembly. It wasn't until later that modern lang
by swebs 8y ago
Nah, it's had those advantages since year 1. Like the the other guy said, it's pretty much high level, portable assembly. It wasn't until later that modern languages introduced bounds checking, virtual machines, garbage collectors, and other things that improve safety but have performance and bloat tradeoffs.
- pjmlp 8y agoMe and others that had our 16 bit codebases full with inline Assembly beg to differ. C benefited from the domino effect of UNIX's adoption, that is all. Had AT&T been allowed to sell UNIX at the same price points as VMS, OS/360, Star among many others, and C would have been a footnote on the history of system programming languages, like many others.
- MaxBarraclough 8y agoBut C code is faster than any other major language, and its low-level facilities are better. > C would have been a footnote on the history of system programming languages, like many others Which programming language would Vulkan be using if we didn't have C? Presumably a language much like C, no?
- pjmlp 8y agoC became faster thanks to 30 years of compiler research improving optimization algorithms while taking advantage of UB. Something else naturally, with stronger memory guarantees and memory unsafe constructs clearly expressed on the type system, like Ada/SPARK, PL/8, PL/S, BLISS or whatever else might have wiped UNIX if it had been closed source sold at the same price level as OS/360, VMS among others.
- MaxBarraclough 8y agoI agree it's a shame there's so little Ada/SPARK. Does Ada hold its own at low-level work though? C interfaces well with assembly code, has pointers, etc. Can Ada compete there?
- pjmlp 8y agoOf course, pointers and FFI to Assembly aren't something magical about C.
- MaxBarraclough 8y agoI'm too used to modern languages. These days, it's rare for a language to have proper pointers.
- pjmlp 8y agoRust, Go, D, C#, Swift, Delphi also have proper pointers, some of them just need asking for permission before doing C style tricks. I am leaving out an endless list of other examples.
- MaxBarraclough 8y agoAh yes, I forget C# has those low-level features. Have never had need to use them. Microsoft copied many of the mistakes of Java when they made C# (all objects are locks, covariant array types, plenty else besides), but they were right to leave out the 'purity' silliness.