Why is still the learning curve for C so high? * Why can't the learning curve be solved using tools? * Why don't we actively promote more higher level languages which are implemented in C (by fewer people)?
Do you find the learning curve for C to be high? I find it quite the opposite. It's a simple language with only a few concepts to learn, once you got those, that's it. There might be some preprocessor tricks you'll pick up later, but the base language and library is pretty comprehensive IMHO.
Tell HN: C Experts Panel – Ask us anything about C
121–130 of 978 posts
Re: Tell HN: C Experts Panel – Ask us anything about C
#122Earlier quoted context omitted.
In BRL's MUVES project, we used a 2-character prefix indicating category. E.g., all the external identifiers for our fancy memory allocator began with "Mm", where Mm.h documented the interface for the Mm package only. To minimize the external identifiers, one could make just the name of a container structure the sole entry access handle, with structure members pointing to the functions. Then use it like: #include if…
Tip: you can use four leading spaces to write code. Like this
like thisRe: Tell HN: C Experts Panel – Ask us anything about C
#123It's used by a lot of current software in Linux, notably systemd and glib2. It solves a major headache with C error handling elegantly. Most compilers already support it internally (since it's required by C++). It has predictable effects, and no impact on performance when not used. It cannot be implemented without help from the compiler.
Re: Tell HN: C Experts Panel – Ask us anything about C
#124What is the story behind the removal of VLAs from C99 in later revisions?
Re: Tell HN: C Experts Panel – Ask us anything about C
#125Are there any plans to "clean up C"? A lot of effort has been put into alternative languages, which are great, but there is still a lot of momentum with C, and it seems that a lot of improvements that could be done in a backwards compatible way and without introducing much in the way of complexity. For example: - Locking down some categories of "undefined behaviour" to be "implementation defined" instead. - Proper ar…
Re: Tell HN: C Experts Panel – Ask us anything about C
#126Re: Tell HN: C Experts Panel – Ask us anything about C
#127Have you considered adding multiplexing capability to the standard? It would be great to have a directly portable one.
Re: Tell HN: C Experts Panel – Ask us anything about C
#128Is there a possibility there will be introduced a new rule saying "if the compiler detects an UB it should abort the compilation instead of breaking the code in the most incomprehensible way possible"? Right now it's just scary to start a new project in C. It would be really great if there was more emphasis on correctness of the produced code instead of the insane optimizations.
Thankfully, there are a lot of tools to help developers catch UB these days (UBSan, static analyzers, valgrind, etc). I would recommend using those tools whenever starting a new project in C (or C++, for that matter).
Re: Tell HN: C Experts Panel – Ask us anything about C
#129Re: Tell HN: C Experts Panel – Ask us anything about C
#130Why is still the learning curve for C so high? * Why can't the learning curve be solved using tools? * Why don't we actively promote more higher level languages which are implemented in C (by fewer people)?
Do you find the learning curve for C to be high? I find it quite the opposite. It's a simple language with only a few concepts to learn, once you got those, that's it. There might be some preprocessor tricks you'll pick up later, but the base language and library is pretty comprehensive IMHO.