-
-
Notifications
You must be signed in to change notification settings - Fork 31
GDScript: First-class functions roadmap #23
Comments
And Finalizers??? |
@jonbonazza it's not on the plans and not related to this topic. You can open a feature proposal ticket with what you have in mind. |
hi, just wondering if things like "Go To Definition" and "Find All References" are possible for variable and function inspections? |
@vnen how is this coming up!? ;) |
Is this still planned for 3.2? |
Just found this issue. First class functions are moved to 4.0 AFAIU. https://twitter.com/reduzio/status/1137410475145216000 Or is it more complicated than that @vnen @akien-mga? |
What happened is that I pretty much didn't have time to work on this for 3.2. There's also some implementation details discussed after this that would require changes to Variant, so it was preferred to be left for 4.0. The changes listed here will likely be implemented to 4.0 along with other stuff, so this roadmap need to be reviewed anyway. I'll leave this here for history and add a note explaining the progress. Soon I will work on another proposal. |
Hey, Sorry for the necro-bump but I don't find any news about First class functions (I don't want to open a new ticket regarding that feature). I wonder, will it be part of Godot 4.0? (including Array filter/reduce/map) |
NOTE: All changes for 3.1 were implemented. Changes marked for 3.2 were postponed to 4.0 and will need a review, since it needs more details. I'll leave the original post for reference and link the new roadmap when ready.
Considering the long-standing requsts to support lambdas and first-class functions, and how that needs to break compatibility, here's the roadmap to the next Godot versions to enable the feature.
Related issues/pull requests:
Godot 3.1 (next release)
Godot 3.2 (release after the next)
var rot = $Sprite.rotate; rot(PI)
This enables a few consequential features (may or may not be added):
connect()
to receive a function reference instead of a string.map()
,reduce()
,filter()
functions to Array, all receiving a function as parameter.The text was updated successfully, but these errors were encountered: