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.
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.
I'm a Systems Reliability and DevOps engineer for Netdata Inc. When not working, I enjoy studying linguistics and history, playing video games, and cooking all kinds of international cuisine.
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.
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.
Top comments (7)
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.
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.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.
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.
In fact it's an "it". :)
But in Latin languages it's pronounced as a masculin word.
I don't understand, sorry, what am I missing? The compiler is referred to as "it", not she/her.
This is just a meme... Compiler pointing out errors but not solving them... Just like females in real life :p
Some comments may only be visible to logged-in visitors. Sign in to view all comments.