|
|
|
|
|
by PaulHoule
318 days ago
|
|
I don't trust you to get it right. One of my formative experiences was typing in a terminal emulator for CP/M from a 1984 Byte magazine and porting it to OS-9 on my TRS-80 Color Computer. It was quite the trauma to see 80% of the code was error handling with the error-prone pattern of checking errno. When I saw Java which had try-catch I was so delighted. "Feels like freedom" is one of the most dangerous feelings out that that reminds you that feelings are not facts. Wasn't it Orwell that coined the slogan "Freedom is slavery?" |
|
... and they still write programs blasted full of security holes and bugs that would be prevented in any other language. (Other that C++.)
Not that other languages are perfect or anything. But we've got decades of proof that C is full of sharp edges and that no, you (and this time I do mean you personally) aren't avoiding them. You just haven't noticed the bleeding yet... and the odds are good it's actually your users that will pay.
I consider greenfielding in C without the absolute best in static analysis backing you up to be professional malpractice. If you're not acting as a professional than that doesn't apply. But no professional should be doing that in 2025. And I consider "C backed with the absolute best static analysis" to still be something you need to be backed into, against your will, because of something very compelling for your project.
Also, the type system is bad, it lacks good closures, it can't abstract worth a toot, by 2025 it is legitimately a bad language despite all the attempted fixes over the decades. And I'm not a "use Haskell for everything" sort of guy... but C is just way, way too deep into the "costs" on the cost/benefits equation. It was a great language for the time, but we did not reach the epitome of programming perfection in the 1970s. I doubt we've reached it even now. Nobody should be reaching for C routinely now.
I advise spending some time learning Rust. I'm not saying that as a crazed Rust advocate... my actual experience with the language is limited to "I compiled Hello World once". But the borrow teacher will teach you a lot of important things about how to think about memory management. Then you will go back to C, and with a couple of hours you'll find yourself appalled. The resulting clarity you will see C with is completely accurate, and while you can get it from other places, Rust is a very efficient teacher of the problems I'm referencing here. In 2025 C is truly an appalling language.