::new argument field shorthand #2
Labels
accepted
This will be worked on
type: feature
Brand new functionality, features, pages, workflows, endpoints, etc.
Projects
Storing constructor arguments in fields is a common pattern in web development even outside of dependency injection. Currently, an argument
arg: Type
must be reiterated as|arg: Type = {arg}|;
to be captured in a field.An argument specified as
priv arg: Type
orpub arg: Type
should automatically be captured in a field of the same name and type with matching visibility.The shorthand syntax is a first draft as of now; suggestions are welcome.
The text was updated successfully, but these errors were encountered: