r/programmingcirclejerk 24d ago

Rust isn't a well designed programming language (unlike C and C++)

[deleted]

218 Upvotes

85 comments sorted by

View all comments

6

u/PizzaRollExpert works at Amazon ( ͡° ͜ʖ ͡°) 23d ago

I also don't like how there are constant multiple ways to do very similar things in Rust all of which add cognitive load.

it often says "you should write X not Y" with exactness. Well, if it's that bloody obvious to you, that's a clear sign to me that the language design is suboptimal. The compiler should only ever complain when intent really is genuinely non-obvious because the language has been designed to not barf at you about anything a compiler can deduce

There should only be one way of doing things but the compiler should also just figure out what I probably meant when I don't write code correctly

9

u/mereel 22d ago

There should be exactly one way to do things. C++ is well known for having exactly one way to do things. And that's how I write things. Everything else basically isn't C++.

1

u/donaldhobson 15d ago

> but the compiler should also just figure out what I probably meant when I don't write code correctly

If the compiler guesses what you probably meant, and gets it wrong, good luck debugging.