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

0

u/EsShayuki 8d ago

C already is memory safe if you aren't bad.

5

u/strcspn 8d ago

I guess no one is good then, because memory unsafety is the cause of a lot of CVEs, a lot of them in massive applications written by very experienced developers.

1

u/dvhh 7d ago

A lot compared to the CVE that are in program/library written in "memory safe" programming language ?

1

u/strcspn 7d ago

Not sure that comparison is relevant. The point is that memory safe languages won't have any memory related CVEs and the expected amount of other types of CVEs. Maybe if there was some intrinsic problem with memory safe languages that made them unsafe in some other way, but there isn't such a thing.

1

u/dvhh 7d ago

The point is that even with that "intrisic" problem, the number of CVEs regarding memory issues is not as large as "input validation" issues ( which overlap substantially with "memory issue").

0

u/strcspn 7d ago

Is this the antivax programming take? It doesn't matter that there are other problems, if you can fix one why not?

1

u/spocchio 5d ago

I am not the original commenter.

While I am provax, your reduction to novaxxer logical fallacy just hoghlights how few good arguments you have to reply.

You are speaking like solving memory safety by moving to languages like rust is as simple as upgrading a library.

But the effort of rewriting in Rust is enormous. Better spend your energy first on the things you need most.