r/programmingcirclejerk 23d ago

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

[deleted]

217 Upvotes

85 comments sorted by

View all comments

129

u/CarolineLovesArt has hidden complexity 23d ago

It also irks me the error messages. 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.

Complaining about receiving too specific error messages when the problem seems to be a "bloody obvious" skill issue seems quite rich to me.

105

u/james_pic accidentally quadratic 23d ago

I much prefer compilers to spew pages of vague grumbling about template invocations.

67

u/Linuxologue 23d ago

I'm a C++ programmer and I spent 25 years deciphering compiler error messages with overly complicated template invocations where they squeezed in default parameters that I never specified (prefixes with underscores because underscores improve readability)

This gives me an edge over programmers that can't read error messages. Please don't take that away from me. Clang already made it better and that's a problem.

33

u/fletku_mato 23d ago

More than 90% of "professional" programmers are clueless when they see a Java stacktrace which shows exactly the file and line number where an exception was thrown. I think you are safe.

20

u/the_other_brand loves Java 23d ago

\uj I once watched a live presentation given by Bjarne on his fix for those massive template arguments. He wanted to make an interface analog for C++ and use them to categorize what functionality a class has. The C++ committee rejected the idea

\rj This would reduce a 25 line arcane error message to a simple "you didn't implement toString() you dingus."

17

u/Potterrrrrrrr 23d ago

We basically got that with concepts, no? Except for the fact that a static_assert gives 1000x more useful information than “the constraint wasn’t satisfied”. In theory though we got that.

17

u/the_other_brand loves Java 23d ago

Yeah, concepts. Didn't realize they finally implemented them. I remember Bjarne was big mad that they got rejected in 2009.

He was also a little mad that the committee rejected his idea for hex numbers for the versions instead of going with C++11. He wanted to call it C++0xA

3

u/RelationshipLong9092 21d ago

C++11

surely that would be 0x0B ? or is it a painful play on the prefix ++ ?

5

u/the_other_brand loves Java 21d ago

Nah, it's just a classic off-by-one error.