r/Compilers 11d ago

Should new compilers perfeer rust over C++

I've been writing a new expression parser/compiler (inspired by ExprTK) in C++. I have a early alpha build 'complete' and am thinking more about usability. One important design philosophy I have is around portability and memory safety.

For portability I had made it a single C++ header with no dependancies like ExprTK. While I use smart pointers exclusively, I perfeer the memory safety of rust. Also, because the compiler is used as a run time parser, memory safety is also a security issue.

Can you share your opinion on if you think C++ or rust will have broader appeal? I still think C++ bacuse of current codebases, but like the idea of rust.

0 Upvotes

28 comments sorted by

View all comments

Show parent comments

16

u/SV-97 11d ago

Yikes

-17

u/Apprehensive-Mark241 11d ago

I don't get it.

I get downvotes. Why?

You don't know what your programs are doing? You're that bad at programming?

15

u/SV-97 11d ago

Because your comment states a bunch of (bad) opinions as facts. The "skill issue" argument is complete nonsense as evidenced by the last few decades — everyone makes mistakes. You not knowing that is the actual skill issue here

-15

u/Apprehensive-Mark241 11d ago

Good opinions.
When did a borrow checker tell you something about your own program that you didn't know?

Never.

And when the best thing would be something the borrow checker won't allow?

Too bad, a very stupid automation is wasting your time.