Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: "Expect" vs. "Expected" in error messages #1182

Open
shahamran opened this issue Nov 9, 2024 · 1 comment
Open

Question: "Expect" vs. "Expected" in error messages #1182

shahamran opened this issue Nov 9, 2024 · 1 comment

Comments

@shahamran
Copy link

Hi, I have a small question not related to code.
Not sure if it's a language thing (English is not my primary language), but the syntax of compile error messages seems weird to me. For example:

consume(TOKEN_RIGHT_PAREN, "Expect ')' after arguments.");

Why is the verb "Expect" and not "Expected"?

Thanks!

@GoldfieldGeek
Copy link

GoldfieldGeek commented Nov 10, 2024

English is indeed a strange and wonderful language. Expect, as used in this context, is forward looking. It means, from where I am now, I expect to find ')' next.

If Expected had been used instead, it would mean looking back. I expected the previous thing to be an ')' instead of what ever I got.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants