3 ms·
Higher level languages (and libraries) seem to be defining the portable interfaces for a lot of what software needs to do now, which helps but essentially seems
by uxcn 11y ago
Higher level languages (and libraries) seem to be defining the portable interfaces for a lot of what software needs to do now, which helps but essentially seems to punt the problem at the operating system level.
I guess portable interfaces may just end up needing to be defined over non-portable interfaces, and C may end up not being practical for anything that needs to be portable.
Higher level languages aren't bad, and it would probably be a good thing if a language like Rust became the de-facto for low-level. My feeling is that C is still the simplest to compile though, which I think is an advantage.
- pjmlp 11y agoSimplest to compile, but very hard to optimize, hence why register and restrict are needed, among many other tricks. But that is a talk for other day.
- caf 11y agoFar from being needed, "register" has been completely ignored by compilers for many years now.
- pjmlp 11y agoNowadays, but back when C was barely used outside UNIX it was essential.
- uxcn 11y agoMost compilers I know of do register allocation better than nearly all humans where optimization is important. Aliasing is a problem, but I don't think it's strictly inherent to C.
- pjmlp 11y ago> Most compilers I know of do register allocation better than nearly all humans where optimization is important. Nowadays yes, you are forgetting C has 40 years of research into compiler optimization. We could easily beat the register allocator in the 90's with Assembly coding, specially in x86. There is a quote from a famous woman in compiler research from the mid-80's, where she claims C semantics have thrown the optimization research back to the dinosaur age. Sadly I cannot find it, as I don't remember the exact words. > Aliasing is a problem, but I don't think it's strictly inherent to C. Most languages have stricter semantics for aliasing and do not decay arrays into pointers. Also they tend to have better type information, which can help the optimizer.