4 ms·
> After 30 years of throwing money at it. Which high-level language used to roundly outperform C, then? C used to be far slower than assembly, sure. That's no
by MaxBarraclough 8y ago
> After 30 years of throwing money at it.
Which high-level language used to roundly outperform C, then?
C used to be far slower than assembly, sure. That's not the point.
- pjmlp 8y agoC was nothing special get that in your head, it wasn't even used outside AT&T, before they started giving away UNIX source code to universities with the symbolic price of around 100 dollars instead of the closed source systems costing several thousand dollars that those universities were paying for. C was just yet another systems programming language looking for developer eyes, among PL/I, PL/S, PL/8, NEWP, Mesa, Modula-2, Concurrent Pascal, Object Pascal, UCSD Pascal, PL/M, Ada, CLU, ... C is the JavaScript of systems programming languages, designed without care for what being done outside AT&T walls since the mid 60's in language research and compiler technology, helped by UNIX and POSIX adoption across the industry thanks to source code availability and symbolic prices until AT&T got split and tried to close down BSD, and naturally the years of investment in optimization research.
- MaxBarraclough 8y ago> get that in your head Manners. Otherwise, interesting points, thanks. I wonder if we'll see the rise of another minimal low-level language anything like C. To put that another way: I wonder if Zig will take off .(I know of no other such projects. I don't know much about Rust but I believe it's a more 'feature-rich' language.) Zig seems like a neat idea for a language - there's plenty to improve on in C without introducing a full 'managed' framework, like its insane implicit type conversions. I still don't know what you mean by "years of investment in optimization research". We have high-performance cross-platform code now. Yes, that took decades.
- pjmlp 8y agoSorry if I offend you that wasn't really my intention. For someone that watched C riding the UNIX wave while killing other safer alternatives, that weren't lucky enough to be bundled with an winning OS, it kind of throws me out when I see C being argued as the ultimate systems programming language. It is an historically accident that things turned out this way, and at very least JTC1/SC22/WG14 should provide a safe C subset. Even ISO C++ working group has ongoing proposals to reduce C's unsafety influence on C++. Otherwise POSIX derived OS will continue to be a collection of security patches and band aids trying to make up for those issues.
- MaxBarraclough 8y agoIf you want a 'safe' C subset, that's what MISRA C is for, no? C++ is a bit of a different beast, as they occasionally concede performance for convenience/correctness. std::shared_ptr is always thread-safe, like it or not. > Otherwise POSIX derived OS will continue to be a collection of security patches and band aids trying to make up for those issues. Agree. The constant stream of buffer-overflow attacks shows just that. It's regrettable that C/C++ are the 'default' languages for writing things like web servers, DBMSs, shells. I imagine it wouldn't be impractical to have a lot of kernel code written in a safer language, for that matter. C is sometimes appropriate, but it's used everywhere.