3 ms·
Having kicked this around I think two problems. One: Compiler development is driven by the C++ standards committee. And they all hate C and wish it would die a
by Gibbon1 7y ago
Having kicked this around I think two problems.
One: Compiler development is driven by the C++ standards committee. And they all hate C and wish it would die already. More to the point things you would do to make C a better more powerful language are orthogonal to the direction C++ is being pushed.
Two: Being tied to C++ also means being tied to the same ABI as C++. And improvements to the C language probably would need some extensions to the ABI.
Three: I can't wrap my head around this but a lot of people are extremely hostile to attempts to extend and improve C.
- jcranmer 7y ago> One: Compiler development is driven by the C++ standards committee. And they all hate C and wish it would die already. The latter statement is not true. But it is true that most of the evolution of C/C++ is driven by the C++ committee, with the C committee mostly adapting features from C++ and very little innovation in C being adapted for C++. (As one C++ committee member confided to me, the C committee does have a bit of a tendency to completely screw things up when the C++ committee liaisons leave the room). But there is still coordination and cooperation between the committees--for example, the recent proposals to replace the current EH model in C++ includes a coordinating proposal to modify the C ABI to provide access to a Result-esque exception model. > Two: Being tied to C++ also means being tied to the same ABI as C++. And improvements to the C language probably would need some extensions to the ABI. The C ABI desperately needs extensions anyways, especially because it is the de facto platform ABI and languages usually only support FFI features using the C ABI. The biggest missing features here are SIMD vector support and multiple return value support.
- Gibbon1 7y agoI apologize for the slight against the C++ standard people. I do like your comment about the ABI needing to be extended to improve FFI features. I feel that way too. Also think that a clean (non clunky) method for FFI is exactly what C has needed for a long time.
- klingonopera 7y agoRegarding three, I believe it's because C ultimately aims to be the most low-level, high-level abstraction of machine code. Stray too far from that, and you're already in C++ territory. Except for multi-core/-threading support, I can't really think of anything that has changed in the past 25 years to add to this, in my opinion, essentially near-perfect language.
- fao_ 7y agoEvery single SYSV x64 ABI platform supports at least two uint64_t return values, which are the registers rdi and rax (Actually it might be rbx, I haven't done assembly for a while). So C is behind of the curve. C is considered to be "High level assembly", up until it isn't. To be honest, YASM and other assemblers do "high level assembly" much better. C is a simple, flexible low-level language. There is a feeling about C that I do not get from other languages, a specific way of thinking and a trend towards simplicity of feature (Ignoring GNU) that other languages (including rust) do not encourage or notice. It would be nice to see it importing some of the type semantics of ML and OCaml.