Replies: 4 comments 8 replies
-
Related to godotengine/godot#42719 |
Beta Was this translation helpful? Give feedback.
-
I personally find this far harder to read, for the For the rest that's an enormous undertaking, making some error messages easier to read is important (and tracked elsewhere) but making error messages give advice is really difficult and generally isn't possible as there's a dozen different things that might be the correct solution and suggesting the wrong solution makes things worse, especially for inexperienced users (who are the ones who would need this IMO) What if it isn't a local variable but an argument someone spelled wrong? Or what if it's a property in the parent class spelled wrong? Etc. This would be far more of a general assistant feature and is really hard to accomplish Further it adds significantly to the burden of translating the editor, which is an important consideration |
Beta Was this translation helpful? Give feedback.
-
I do agree with the sentiment, I really do, but the extra verbosity is a lot more words that non-native speakers have to parse. For people that do understand it, it's a bit... condescending, too? Having it be an "option" would be a big burden for all contributors involved. There are ways to address this more subtly, a middle ground to make error messages more accessible while still quickly getting to the point. For the example above, honestly, "declared" could just be "does not exist", as is it what it essentially means:
Overly technical wording in an otherwise simple concept is a bad habit across all of Godot, due to engine contributors being on a "whole other level" compared to actual engine users. |
Beta Was this translation helpful? Give feedback.
-
I agree that we should improve specific error messages and perhaps the format in general, as long as it does not hurt both novice and advanced users. For example, if you find Consider that conciseness has its advantages as well as disadvantages. Short messages allow you to spend less time recognizing the error, while more detailed and friendly errors can be annoying because you have to spend more time to extract the error meaning. There was also a discussion about assigning numeric/string identifiers to GDScript errors, but I couldn't find it. This is important if we want to add localization to error messages. If we add something like this in the future, I think the error should consist of two parts: a short description with technical terminology that may be unclear to beginners, and details that describe the essence of the error and its possible causes in more understandable language. We could do it like in Firefox debugger: add a Learn More / Help / Details button and when clicked, open a website / Editor Help page with details about the error. MDN - ReferenceError: "x" is not defined This would also help to avoid misunderstanding. When you read about an error on a website, you are more likely to guess that these are abstract examples, rather than a recipe for fixing your specific error. I think we should be careful about trying to educate the user or give them advice in the error description directly. Often we do not have enough context and the compiler is not smart enough to give useful advice. It's bad when we give useless advice, and very bad when we give misleading advice. Let me demonstrate this in more detail. When you try to help someone, you usually do the following steps:
So I think that only point 1 can be detected more or less reliably and should be displayed in the error message. Points 2-4 are more material for a website or a new help page. |
Beta Was this translation helpful? Give feedback.
-
As I've interacted with people just getting into programming (not just Godot), one thing I've often noticed is that people get flustered and confused by the wording in error messages. For example, someone might get the error message:
They might be confused by terms like "identifier", "declared", and "scope", and not understand what the
(10, 9)
means. A more friendly equivalent error message might look like so:While it's longer than the original error message, it may help those new to scripting better understand what's going wrong with their code, and how they could try to fix it. The example here of course isn't a finished draft of what it should show for this type of error message, but hopefully it's at least a starting point for people to understand the idea here. Later on, if people are interested, I could try drafting out more "friendly" versions of error messages from the analyzer.
Beta Was this translation helpful? Give feedback.
All reactions