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
I don't think I'd add too much complexity and I'd be really useful. The workaround for this is to declare the init-field after 'other' and to store it in the struct, which also forces a copy if the initialized class takes the parameter by value.
The text was updated successfully, but these errors were encountered:
chilabot
changed the title
Add the capability of 'only-init' variables.
Add the capability of 'init-only' variables.
Mar 6, 2023
chilabot
changed the title
Add the capability of 'init-only' variables.
Add the capability of 'init-only' fields.
Mar 6, 2023
I'd be nice to have 'init-only' fields, so you can use them in field initialization:
Like https://docs.python.org/3/library/dataclasses.html#init-only-variables
I don't think I'd add too much complexity and I'd be really useful. The workaround for this is to declare the init-field after 'other' and to store it in the struct, which also forces a copy if the initialized class takes the parameter by value.
The text was updated successfully, but these errors were encountered: