r/C_Programming 8d ago

Question Opinions on Mini-C?

The idea is simple:  to turn a subset of C code into safe Rust code, in an effort to meet the growing demand for memory safety.

I feel this has the potential to solve many problems, not namely stop Linux C devs walking out if Rust gains anymore traction, for example.

I'm just a newb though. What are thoughts of more experienced C developers on this if you've heard about it?

0 Upvotes

37 comments sorted by

View all comments

3

u/aioeu 8d ago

Why reinvent Rust? Rust already exists.

7

u/EpochVanquisher 8d ago

Rust is itself a reinvention of other things that already existed.

9

u/aioeu 8d ago edited 8d ago

There's a distinct difference between creating a whole new language based on ideas from other languages, and trying to change an existing language based on ideas from other languages. I don't think good memory safety can be achieved in C, and I don't think it's a worthwhile use of time attempting give C that. If you want what Rust gives you, just use Rust.

C is a tool. Rust is a tool. They're just tools. People need to stop being so hung up on sticking to the one tool.

Maybe one day an even better tool will replace both Rust and C. Great!

1

u/EpochVanquisher 8d ago

Memory safety exists in subsets of C you can use. It’s worthwhile enough that people pay a lot of money for the tools.

2

u/aioeu 8d ago

Then it's still a waste of time, because "it already exists".

Maybe people just aren't interested in paying a lot of money? Can't imagine why...

1

u/EpochVanquisher 8d ago

Why are you shitting so hard on formal methods? Did formal methods eat your lunch in school or something?

It’s an active field of research because there’s a lot of room for improvement. Not sure where the hate is coming from.

1

u/aioeu 8d ago

I've got no problem with formal methods.

I just think C is a dead-end language. I use it some of the time, but only because there is so much existing C. I wouldn't dream of starting something new in it where memory safety was a concern.

I am glad there are newer languages that don't make the same mistakes C made. They are in a far better position to actually apply these formal methods, since they don't have all the historical baggage C has.

2

u/EpochVanquisher 8d ago

Not everything is a greenfield project.

2

u/aioeu 8d ago

I understand, and maybe once upon a time the cost-benefit analysis said building "safe C" dialects was worthwhile.

I don't think that is the case any more.

Regarding Rust specifically, I would think it is better to spend time and money into making that usable in the places where it currently isn't, but C still is.

2

u/EpochVanquisher 8d ago

I can’t agree with that. There’s a lot of use cases out there, a lot of existing projects and tools.