Learning C as someone who already knows Rust

71 points cstatemusic

Hi fellow rustaceans, I might be in some controversy here but does anyone have any good resources to learn how to write professional, "correct", safe-as-possible C code for people who already have a background in Rust or other systems programming languages? I know it sounds kinda backwards, but it's been years since I first learned C and I've been doing so much Rust recently that I would kind of like to dabble in some C again for old time's sake. If anyone has some resources for experienced developers on how to write good modern C code, I'd be interested in checking them out! I figured I'd ask here since there's probably some overlap in the users of both languages here, or at least other people with experience in both. Thanks in advance!

Edit: To clarify, I realize C is a pretty simple language in terms of features. I can get by writing scratchy C code right now, but I have no idea how to write it in any kind of "standard" way. I'm mainly wondering things along the lines of, if I were to want to get a job programming C in the modern day, what C skills would I need and how could I learn them? Or, how could I transfer my Rust knowledge/habits to C again?