-
Notifications
You must be signed in to change notification settings - Fork 8
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
documentation for 'self' and 'other' keywords is not accurate to runtime behavior #2044
Comments
Made a few first changes to the manual to clarify |
Moved to In Progress to indicate some work has already been done for this. |
Related ticket: #7274 |
* Also changed references of a self/other 'value' to 'reference' YoYoGames/GameMaker-Bugs#2044
Description
Currently the most information you can get from the manual for
self
andother
keywords is a single page:https://manual.yoyogames.com/#t=GameMaker_Language%2FGML_Overview%2FInstance_Keywords.htm
While some of that is accurate most that deals with how those two keywords work in different scopes is inaccurate.
The most illuminating we have for
self
is this line:While super vague it is almost entirely untrue.
For
other
we have this line:Which is not true on all cases.
The same section for
other
links to the manual page for Struct Constructors section Instance Variables: https://manual.yoyogames.com/GameMaker_Language/GML_Overview/Structs.htm#inst_in_structWhich states:
This again is potentially incorrect in some cases.
Consider the following example:
Take your time and guess what the output is. If you guess wrong or right doesn't matter. The problem is you will be guessing as there is no documented behavior that explains the output.
Either update the manual to describe current runtime behavior or update runtime behavior to match documented behavior.
My suggestion:
Ideally these keywords will never have multiple values in the same scope. And a user will never have to 'guess' at their value.
Take your time. There are many ways to skin a cat. If these keywords remain problematic AND undocumented I'll just continue to avoid patterns that would use them. If you can document whatever their behavior truly is then they will at least be usable.
Thank you,
Your work and effort are appreciated.
This is related to closed tickets #1955 and #2020
Manual Link
https://manual.yoyogames.com/#t=GameMaker_Language%2FGML_Overview%2FInstance_Keywords.htm
The text was updated successfully, but these errors were encountered: