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
Add ErrorCode enum with error codes #1132
Comments
Definitely not for 1.1.5 since that would be a huge breaking change to the contract b/w typechecker and IDE. |
Plus what would be much better would be to create subclasses of |
What? Turning a bunch of ints into enums? That's a big change? It's annoying because it's manual, since you never defined constants instead of literals, but that's a pretty trivial manual change. Perhaps subclasses of error would work too, but if we're talking about 100 error codes, you will still need enums (which BTW is what it's made for) because you're not going to create 100 subclasses. |
Sure, it immediately makes the 1.1.5 IDE incompatible with the 1.1.0 compiler and vice-versa. |
Well, not really because they don't talk to eachother since the IDE ships with its own version of the compiler. And that will be true anyways when we add features in the AST like These magic numbers are used in at least three projects now so it really looks ridiculous. When these were 2-3 constants it was OK, but now, it just looks bad. |
Insted of using numbers and luck all over the code.
The text was updated successfully, but these errors were encountered: