You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the project you are working on:
Nuclear Reactor control room simulation
Describe the problem or limitation you are having in your project:
I would love to be able to use static typing throughout my project, but currently I run into several issues that prevent me from doing it very widely.
One major issue is that classes can not reference each other, even transitively. This leads to cyclical reference errors very often, and some times, due to the transitive nature of it, in unexpected cases.
The end result is I often have to just remove the static typing.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I recognize that this would probably end up being a pretty big task.
GDScript would probably need to implement some sort of multi-pass complication. First scan every script file collecting public symbols (member variables and functions). Then run a second pass where method bodies are actually evaluated, this time with full knowledge of all of the accessible symbols.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
In the end it would allow for something even as tightly coupled as this:
The above is an extreme example, and let me stop you right there, yes it's obviously bad code. However if the type system is robust enough to support that worst case scenerio, then it can support anything we might need to do with it.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I think it would be used quite often!
However, the work around is just to not use static typing sadly.
Is there a reason why this should be core and not an add-on in the asset library?:
It's fundamental to how GDScript parses scripts, it can't be implemented externally.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on:
Nuclear Reactor control room simulation
Describe the problem or limitation you are having in your project:
I would love to be able to use static typing throughout my project, but currently I run into several issues that prevent me from doing it very widely.
One major issue is that classes can not reference each other, even transitively. This leads to cyclical reference errors very often, and some times, due to the transitive nature of it, in unexpected cases.
The end result is I often have to just remove the static typing.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I recognize that this would probably end up being a pretty big task.
GDScript would probably need to implement some sort of multi-pass complication. First scan every script file collecting public symbols (member variables and functions). Then run a second pass where method bodies are actually evaluated, this time with full knowledge of all of the accessible symbols.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
In the end it would allow for something even as tightly coupled as this:
The above is an extreme example, and let me stop you right there, yes it's obviously bad code. However if the type system is robust enough to support that worst case scenerio, then it can support anything we might need to do with it.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I think it would be used quite often!
However, the work around is just to not use static typing sadly.
Is there a reason why this should be core and not an add-on in the asset library?:
It's fundamental to how GDScript parses scripts, it can't be implemented externally.
The text was updated successfully, but these errors were encountered: