DEV Community


A compiler is She/Her? 🤔

Noman Gul
Muhammad ﷺ follower Web/App Dev• Freelancer• ❤ React / React-Native• Be Strong and Code On!
・1 min read

Alt Text

Discussion (7)

ghost profile image
Ghost • Edited

Because it shouldn't asume that he (in spanish is a he) knows what the error is, it might be that you missed a bunch of code not just the ; asuming that, would hide the problem from the programmer. As an example, the Rust compiler gives you suggestion to solve the problem, but it still gives you an error. If the compiler could infer without a doubt what was your intent with or without a character, then the language has a redundant syntax, then the real question should be why we use that character in the first place.

combinatorylogic profile image

That's exactly an example of a bad error message. The intention to be helpful was good, but, as usual, resulted in even more confusion.

The right wording should have been "a semicolon might be missing" - as compiler does not really know that this was your intention. Maybe you just accidentally inserted an extra ) so it's now thinking that the statement is finished, while you still have few more function arguments to add at this point.

ahferroin7 profile image
Austin S. Hemmelgarn

Grammatically, the compiler is usually masculine in most Indo-European languages, and therefore typically gets referred to with a masculine pronoun. The pronoun in this case though is probably referring to the cousin.

That said, the tweet in question brings up one of the issues I have with a lot of compilers and language run-times, they spit out error messages as if they're gospel, but quite often they're just plain wrong. The most blatant example is how missing a parenthesis or adding an extra one can result in an error message that has nothing to do with parenthesis showing up dozens of lines away in the code.

ghost profile image
Ghost • Edited

Not to preach about Rust but have you seen their compiler messages? they are glorious!, it even gives you multiple suggestions on how to fix the problem and you can even ask it for an explaination of the problem with examples, a full explanation like what you would expect from a tutorial or book. So far always points exactly the right problem. I must say, the compiler is very slow tho (altough getting faster with each new version). But the compiler and the linter is very smart, even giving you suggestion on how to make the code more efficient not only warning about unused variables and that superficial level, it even gives you suggestions on how to take advantage of lazyness of some operation.

byrro profile image
Renato Byrro • Edited

In fact it's an "it". :)

But in Latin languages it's pronounced as a masculin word.

mellen profile image
Matt Ellen

I don't understand, sorry, what am I missing? The compiler is referred to as "it", not she/her.

nomangul profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Noman Gul Author

This is just a meme... Compiler pointing out errors but not solving them... Just like females in real life :p