Re:The two types of C programmers (a provocative thesis)
by tourist2d on Sunday April 23, 2023 @07:09PM
(#35681651)
Ask any experienced C developer and they'd all say "I write excellent C compared to all C programmers out there."
Re:The two types of C programmers (a provocative thesis)
by gavinhoward on Sunday April 23, 2023 @07:48PM
(#35681951)
That is true. I'm repeating what others have judged and told me.
Of course, feel free to judge for yourself.
Re:The two types of C programmers (a provocative thesis)
by amoss on Monday April 24, 2023 @01:01AM
(#35683835)
This could be true if you consider survivor bias.
Re:The two types of C programmers (a provocative thesis)
by camgunz on Monday April 24, 2023 @09:31AM
(#35687414)
I'm an experienced C developer and I wouldn't say this. I'm pretty meticulous, I use as much tooling as I can, and I've still written over/underflows, memory corruption, threading heisenbugs, double frees, NULL derefs, etc. etc. etc. My defect rate has gone way down over the years, but that's probably 50/50 experience vs. an attenuation of my ambitions.
I think the proof is in the pudding here. I can't imagine using a messaging client or an email client written in C, and also there isn't much that is written in C anymore even if I wanted to: you're looking at Swift/Java/Kotlin/TypeScript/JavaScript/C#/Vala/Dart/Rust/Go, and maybe C++.
Is anyone writing production servers in C these days? It feels like they're 100% Go and Rust.
There are notable exceptions, in particular I'm thinking about OpenBSD. I think OS dev is a pretty niche area though, especially when you're talking about OpenBSD's wide platform support, so I think it's more the exception that proves the rule than anything.
I don't disagree [1], but remember that Rust can be unsafe too. Async is not a panacea, and it's confusing. And the `unsafe` escape hatch is still unsafe.
> you have a professional obligation to use a higher-level language, with stronger guarantees
Oh? So we have professional obligations now? For FOSS? News to me.
I don't get paid for my work. Not yet. So I have no obligation.
And when I do get paid, my code will be in my own safe language.
This accusatory response is exactly the kind of thing that puts a lot of people off Rust.
> factually, you do not. nobody does.
When I say "write C at a high level," I don't mean that I'm perfect. I mean that I write excellent C compared to all C programmers out there.
Engineering is not about perfection; it never was. It's about doing the best we can with the tools that we have.
[1]: https://git.gavinhoward.com/gavin/bc/src/branch/master/MEMOR...