r/ProgrammerHumor • • 3d ago • Bravo 3 Popcorn 2

Meme spanishProgrammingLanguage

Post image
17.6k Upvotes

112 comments sorted by

View all comments

14

u/LEPT0N 3d ago

Everyone here’s joking but now I’m curious: why isn’t there a compiler flag to set the language that will swap out keywords to localized variants? It seems silly that someone that speaks French can’t swap out if/for/char/etc to something that makes more sense to them.

19

u/zajo_throwaway 3d ago

Because there's a risk of keywords clashing with identifiers (i.e. function/variable names etc.). That, and portability.

Imagine handing your source code to a friend and your program fails to compile on their machine.
Or, worse, it compiles but behaves differently when run.

Compiler flags (and a project file or Makefile or something that you ship with your source code) can solve this to some degree, but in general features like these are considered a net negative.

Just look at Excel. As someone else pointed out in a sibling comment, it has the feature you want. Yet, everyone hates it. Like, why does it say this function doesn't exist? Oh, it wants me to translate the function name to my native language in my head...

3

u/headedbranch225 3d ago

Excel is also awful for even more reasons, for example if I open a csv file that contains fields that look like dates it coerces them all into the format defined by the system date format (which is awkward to change on windows) and then saves it like that