News for hackers. Stuff that matters.
Re:"No way to prevent this" say users of only language where... by xena on Wednesday May 22, 2024 @04:04AM (#40438486)
I have a longer nuanced post to write out at some point about my feelings here, but here's the cliff's notes:

We should not be developing new projects in C, and we should make it politically hard to make new projects written in C in distribution repositories. C is going to stay around for a long time and that's okay, but there are so many inherent problems of its design and implementation that make it unsuited for unsupervised use. I wish that we didn't have to make such hard-line stances about this, but people have continuously proven that this tool is unsuitable for modern development and it's only going to get worse as time goes on.

Re:"No way to prevent this" say users of only language where... by maeln on Wednesday May 22, 2024 @04:10AM (#40438526)
> We should not be developing new projects in C

I would give at least embedded development a pass, since you rarely do have a choice there

Re:"No way to prevent this" say users of only language where... by xena on Wednesday May 22, 2024 @04:12AM (#40438541)
Well, yes. I'm more focusing on user space applications here. This is why that nuance post would have to be so long. People here would probably misconstrue it to be that I want to "kill C" though. That's part of the reason why I haven't written it yet lol
Re:"No way to prevent this" say users of only language where... by p_l on Wednesday May 22, 2024 @04:39AM (#40438756)
Mostly because you often get shipped half-broken pile of C-based SDK as your blessed environment.

Not because there's no other options (and long before Rust had its name coined)

Re:"No way to prevent this" say users of only language where... by pjc50 on Wednesday May 22, 2024 @04:41AM (#40438780)
It's difficult, because "embedded not networked" is an environment where security risks are low, but "embedded networked" is a really nasty environment of haunted routers and abandoned IoT devices.

Is it acceptable to risk buffer overruns on the HTTP server running on an insulin pump?

Re:"No way to prevent this" say users of only language where... by j-krieger on Wednesday May 22, 2024 @07:50AM (#40439844)
I agree. I regularly use Rust on embedded devices and what many advocates like to leave out is that you're just using regular old C under the hood anyway. It's bindings all the way down.
Re:"No way to prevent this" say users of only language where... by immibis on Wednesday May 22, 2024 @04:27AM (#40438659)
If your distribution refuses to package useful free software, I'll use another distribution. I think this is true for most people.
[dead]
Re:"No way to prevent this" say users of only language where... by pjc50 on Wednesday May 22, 2024 @04:37AM (#40438741)
Fine, but there's no reason you should be allowed to ship C in devices which have safety critical consequences to the public, including unnecessary risk of data security breaches through allowing buffer overruns. You can write in a nice safe sandbox over there.

(maybe this will eventually be part of the UL/CE requirements, "contains no C code")

Re:"No way to prevent this" say users of only language where... by WesolyKubeczek on Wednesday May 22, 2024 @06:38AM (#40439401)
C and C++ have another brand of safety "safe" languages du jour don't have: it's an ISO standard. Granted, it's not a very good standard, but the upside is that everyone and their dog has a C compiler for every new architecture, and I bet C++ too. You are not, strictly speaking, beholden to any single compiler implementation out there, they all have their idiosyncrasies, but C won't disappear overnight.

It's more even than having a single foundation oversee it. C and C++ are largely immune to, say, a foundation dissolving because one day it turns out its members cannot comport themselves as responsible adults and a big enough drama ensues. The fact that C and C++ have no singular "community" to speak of is a very strong side.

So when there are at least two (or better three) fully independent implementations of your C alternative, we'll talk about gatekeeping C.

Now, if you are a vendor and capital owner, nothing forbids you from forbidding C within your company and devices you produce. That has been your prerogative since forever, predicated on your ability to afford it. I'm more wound up about activists and evangelists trying to impose their hobby horse upon others. You do you. Show, don't tell.

Re:"No way to prevent this" say users of only language where... by Xeamek on Wednesday May 22, 2024 @04:40AM (#40438766)
That's not how society progress.

At some point you just disallow horses to go onto the high-speed road, and aren't waiting for literally every last farmer to sell their horse over a car.

Re:"No way to prevent this" say users of only language where... by WesolyKubeczek on Wednesday May 22, 2024 @06:28AM (#40439348)
High-speed roads are a low percentage of all roads.
Re:"No way to prevent this" say users of only language where... by xena on Wednesday May 22, 2024 @04:40AM (#40438760)
Thank you for demonstrating why I haven't written that longer post yet. I'd just be torn apart and berated for bothering to express nuance.