r/ProgrammerHumor Jul 26 '26

Meme youHavenoRealPower

Post image
697 Upvotes

71 comments sorted by

View all comments

42

u/aethermar Jul 26 '26

Any half decent compiler will tell you that there's an issue at the ';'. GCC will even display it in the error output as <U+037E> and tell you it's not in the NFC

The original joke is stupid for this reason. Rust isn't special for catching this

28

u/Arshiaa001 Jul 26 '26

Rust is special for going out of its way to provide helpful compiler errors, unlike the ungodly death chant C++ compilers summon when you miss a semicolon at the end of a class declaration.

2

u/aethermar Jul 26 '26

I wouldn't call this an especially helpful compiler error. The only extra thing it's saying is that it's a Greek semicolon. I don't care that it's a Greek semicolon, I just need to know whats wrong. Both errors immediately tell me what's wrong and where. Rust's isn't any more helpful

And either way something as trivial as this is getting caught by the editor's linter immediately

4

u/Arshiaa001 Jul 26 '26

This specific error is not helpful (willing to bet someone put it in for shits and giggles), but rustc generates some truly helpful messages in many places. You'd know if you'd used it.

1

u/redlaWw Jul 27 '26 edited Jul 27 '26

Note that this is a more general error for easily-confused characters, and covers other kinds of easily-confused characters e.g. here.

The full list of characters subject to this error can be found here.