Builder interface for registration of Signals #813
Labels
c: core
Component: core (mod core_types, object, log, init, ...)
quality-of-life
No new functionality, but improves ergonomics/internals
Milestone
Since v0.9, we have had idiomatic builder interfaces for registering properties, then for methods, but not yet for signals. This makes signals a lot more cumbersome to use, and out of place in terms of API design, compared to other aspects of exposing a GDScript API.
Drawbacks
No known drawbacks.
PropertyBuilder
andMethodBuilder
has proven to be successful.Alternatives
No known alternatives. The builder pattern is ubiquitous in the Rust ecosystem for use cases like this.
Further features like typed signal emission (#758 (comment)) and derive macro support (#715) are orthogonal to the procedural registration API.
Prior art
The API of
clap
can serve as an inspiration on how multiple named arguments can be handled.The text was updated successfully, but these errors were encountered: