“C is how the computer works” is a dangerous mindset for C programmers
words.steveklabnik.com
“C is how the computer works” is a dangerous mindset for C programmers
1–10 of 387 posts
Re: “C is how the computer works” is a dangerous mindset for C programmers
#2Re: “C is how the computer works” is a dangerous mindset for C programmers
#3Re: “C is how the computer works” is a dangerous mindset for C programmers
#4So the Rust community is now pushing anything with "Rust" in the title even if it's content free? There's absolutely nothing here other than an announcement that Mr. Kablink decided not to write this blog post. Yet the Rust community dutifully brigade-votes this to the front page.
Seems pretty uncontroversial for “propaganda.”
Re: “C is how the computer works” is a dangerous mindset for C programmers
#5Interesting this is less of blog post and more of an announcement that a blog post will not be written.
Re: “C is how the computer works” is a dangerous mindset for C programmers
#6Re: “C is how the computer works” is a dangerous mindset for C programmers
#7The computer is the thing that has the web browser running on it.
The computer is the thing that has the code editor running on it.
The computer is the thing that has the compiler running on it.
The computer is the thing that provides a virtual hardware interface for running programs.
The computer is the thing that the virtual hardware interface interacts with.
The computer is the thing inside the hard drive/graphics card/other component that the computer talks to.
The computer is the thing inside the processor that pre-processes, jits, or otherwise transforms commands from the computer for the computer so the computer ... ... ...
Re: “C is how the computer works” is a dangerous mindset for C programmers
#8Re: “C is how the computer works” is a dangerous mindset for C programmers
#9Re: “C is how the computer works” is a dangerous mindset for C programmers
#10But there is an interesting catch to it: because C is so important, and programmers at large know so little "real C", vendors do their damndest to make it work for them.
A well-known microcontroller forum in Germany is constantly pushing that you need to make your code safe in the case of concurrent access to a variable by a main loop and an interrupt. By making it volatile.
Strictly speaking that's plain wrong. You need some kind of mutex.
Practically speaking, no embedded C compiler vendor would dare use an "optimizing opportunity" and surprise his customers there.