Earlier quoted context omitted.
I would argue it's very easy to think one understands it. However I would wager most people who say they understand C don't really know many of the undefined behaviour cases and their implications.
The number of people I have interviewed that have used C and C++ for years and can't tell me what undefined behavior is is too damned high. I've had one or two, and only one of them could give me a coherent answer of what the compiler is allowed to do if it runs across it. In my experience it's only the language lawyers who actually know what to look out for, and there are damned few of them. Which is stupid since un…
Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
41–50 of 118 posts
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#42The primary benefit to C is that it is simple. And that is IMO the reason why it has such sticking power. The entire language & toolchain is understandable at a fairly core level without too much effort. Please don’t start a C flame war either HN. I know I’m nerd sniping you all on this one
Write a multithreaded program guaranteed to have no data races in C and tell me that C is simple. C _looks_ simple, deceivingly so. As soon as you need to deal with a large project in a corporate environment on a code base aged in double digit years you don't think it's simple anymore. C is incredibly complex, unmanageably so.
I've done this before, never felt like C wasn't simple.
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#43Earlier quoted context omitted.
I'm not sure if I agree with any statement of the form "The use-case for Rust is not the same as foo ." for any foo where Rust is replacing a language that replaced foo . Rust is replacing C++ in several well documented places, however C++ itself was a replacement for C in many places. So by definition the use-case for Rust overlaps the use-case for C. Arguments like this sound like old arguments that were re-told to…
"C++ itself was a replacement for C" Actually, Cpp originally was a C template pre-compiler if I recall... just like Rust was. Note, people argue for years about various language merits. "there's nothing of note in the last 10 months" Indeed, still a pain to build, port, and package on some systems due to the poor project design required dependencies. There are papers pointing out the common fallacy of increased memo…
So when he started at Bell Labs and all it had was C, he quickly got busy getting his high level tooling back.
Being a C preprocessor was the quickest way to achieve that goal.
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#44The primary benefit to C is that it is simple. And that is IMO the reason why it has such sticking power. The entire language & toolchain is understandable at a fairly core level without too much effort. Please don’t start a C flame war either HN. I know I’m nerd sniping you all on this one
Write a multithreaded program guaranteed to have no data races in C and tell me that C is simple. C _looks_ simple, deceivingly so. As soon as you need to deal with a large project in a corporate environment on a code base aged in double digit years you don't think it's simple anymore. C is incredibly complex, unmanageably so.
I think your main argument here is that large C code bases can easily become unwieldy, and I agree with you on that. However, simple multithreading in C is simple. It's not a terribly difficult problem to solve.
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#45Earlier quoted context omitted.
Write a multithreaded program guaranteed to have no data races in C and tell me that C is simple. C _looks_ simple, deceivingly so. As soon as you need to deal with a large project in a corporate environment on a code base aged in double digit years you don't think it's simple anymore. C is incredibly complex, unmanageably so.
>As soon as you need to deal with a large project in a corporate environment on a code base aged in double digit years you don't think it's simple anymore. I've done this before, never felt like C wasn't simple.
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#46Earlier quoted context omitted.
Write a multithreaded program guaranteed to have no data races in C and tell me that C is simple. C _looks_ simple, deceivingly so. As soon as you need to deal with a large project in a corporate environment on a code base aged in double digit years you don't think it's simple anymore. C is incredibly complex, unmanageably so.
It's never really necessary to write a multithreaded program. It's probably better to come up with a better architecture and communication method. In a corporate environment, just use Java or C# or whatever. It's a corporate environment, probably not that interesting. C is not necessary.
Even modern drivers for Apple, Google and Microsoft platforms are written in C++.
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#47Earlier quoted context omitted.
Write a multithreaded program guaranteed to have no data races in C and tell me that C is simple. C _looks_ simple, deceivingly so. As soon as you need to deal with a large project in a corporate environment on a code base aged in double digit years you don't think it's simple anymore. C is incredibly complex, unmanageably so.
It's never really necessary to write a multithreaded program. It's probably better to come up with a better architecture and communication method. In a corporate environment, just use Java or C# or whatever. It's a corporate environment, probably not that interesting. C is not necessary.
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#48This entire article seems to amount to "I am used to C, thus I don't see the problem with C." which is a fine position to have, but it's a perspective unique to the writer and others like him. It doesn't apply to people learning new languages that aren't C. Also several statements about how C must be used because somehow it's closer to the real world/hardware than other languages. Which is easily shown to be false gi…
No, the problem is not that modern CPUs want to be a PDP-11, it's that they want to be an 8086 for compatibility reasons. From the software's perspective, the ISA *is* the hardware. It doesn't matter if the CPU is internally recompiling everything to a RISC-like architecture with an arbitrary number of registers because there's nothing i can do to access that. If there's ever a radical new ISA which supplants x86 whe…
Which in the very initial paragraphs points out it is not about having a hidden set of registers to work with - it's about exploiting parallelism and the tension between a sequential programing language and massively parallel hardware architecture.
The ISA is not the hardware it's a 40 decade old abstraction that the hardware bends itself into to make your code run.
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#49Earlier quoted context omitted.
Write a multithreaded program guaranteed to have no data races in C and tell me that C is simple. C _looks_ simple, deceivingly so. As soon as you need to deal with a large project in a corporate environment on a code base aged in double digit years you don't think it's simple anymore. C is incredibly complex, unmanageably so.
It's never really necessary to write a multithreaded program. It's probably better to come up with a better architecture and communication method. In a corporate environment, just use Java or C# or whatever. It's a corporate environment, probably not that interesting. C is not necessary.
Mind expanding on that?
Re: Some Were Meant for C – The Endurance of an Unmanageable Language (2017) [pdf]
#50This entire article seems to amount to "I am used to C, thus I don't see the problem with C." which is a fine position to have, but it's a perspective unique to the writer and others like him. It doesn't apply to people learning new languages that aren't C. Also several statements about how C must be used because somehow it's closer to the real world/hardware than other languages. Which is easily shown to be false gi…
No, the problem is not that modern CPUs want to be a PDP-11, it's that they want to be an 8086 for compatibility reasons. From the software's perspective, the ISA *is* the hardware. It doesn't matter if the CPU is internally recompiling everything to a RISC-like architecture with an arbitrary number of registers because there's nothing i can do to access that. If there's ever a radical new ISA which supplants x86 whe…
Precisely! And because the weirdness happens below the ISA, all the mismatches Dave Chisnall describes apply to any other language just as much including actual machine language. So raw machine language is not a low-level language? .