-
Notifications
You must be signed in to change notification settings - Fork 334
Open
Labels
design:neededA design request has been raised that needs a proposalA design request has been raised that needs a proposal
Milestone
Description
Currently, it seems that decorators only accept arguments positionally. I'm wondering if it would be feasible/beneficial to support keyword arguments.
// 1 - Positional makes it hard to know the expected inputs when there are many options
@petDecorator("Fluffy", 10, "orange", "tuna")
...
// 2 - Makes it a lot easier to know what you are setting, and only set those parameters you care about.
@petDecorator(name: "Fluffy", age: 10, color: "orange", favoriteTreat: "tuna")
...
// 3 - Alternatively, you could just have many small decorators.
@petName("Fluffy") @petAge(10) @petColor("orange") @petFavoriteTreat("tuna")
...
Metadata
Metadata
Assignees
Labels
design:neededA design request has been raised that needs a proposalA design request has been raised that needs a proposal